[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v2] x86/iommu_init: address a violation of MISRA C:2012 Rule 8.3



On 30/10/23 16:01, Jan Beulich wrote:
On 25.10.2023 15:01, Federico Serafini wrote:
Make function definition and declaration consistent and emphasize that
the formal parameter is deliberately not used.

Coming back to my earlier objection: Did you consider alternatives? Best
would of course be to get rid of the forward declaration. That seems
possible, albeit not quite as straightforward as it ended up being in
other cases. Second best would be to rename the parameter in the forward
declaration. Question of course in how far "emphasize that the formal
parameter is deliberately not used" is important here. (If it was, I
wonder why VT-d's do_iommu_page_fault() is left alone.)

Jan

I can propose a new version of the patch with the second option.
If one day you will decide to accept also Rule 2.7 ("A function
should not contain unused parameters"), then a deviation based on
the parameter name "unused" would be viable.

If, however, there is interest in applying the first option,
I think the best thing is for you to take care of it.

--
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.