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

Re: [XEN PATCH] x86: I/O emulation: fix violations of MISRA C:2012 Rules 8.2 and 8.3



On 19/07/23 10:32, Jan Beulich wrote:
On 19.07.2023 10:24, Federico Serafini wrote:
Give a name to unnamed parameters thus fixing violations of
MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
named parameters").
Keep consistency between parameter names used in function declarations
and names used in the corresponding function definitions thus fixing
violations of MISRA C:2012 Rule 8.3 ("All declarations of an object or
function shall use the same names and type qualifiers").

Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
---
  xen/arch/x86/include/asm/hvm/emulate.h |  8 ++++----
  xen/arch/x86/include/asm/hvm/io.h      | 14 +++++++-------
  2 files changed, 11 insertions(+), 11 deletions(-)

If it was just the 2nd file, I'd agree with the "I/O" in the title
(albeit as a minor remark and as mentioned elsewhere, personally I
think double tags in titles are undesirable, and blanks in tags
aren't nice either). So perhaps "x86/HVM/emul:" ?

"x86/HVM/emul:" is okay.
I will follow your suggestions in the next patches.

The code changes themselves look okay to me (no matter that I don't
like some of them), so
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
I'd be happy to make, while committing, whatever title adjustment
that you can agree with.

One other note though (there's no good general place to put it):
I'm also a little unhappy with all of you often using "fix" in the
titles, when you don't really fix any bugs. There are certainly
cases where addressing Misra complaints also fixes bugs, but that's
more the exception than the rule. Could we settle on something
like "eliminate", "address", "avoid", or alike when changes are
merely about style or other aspect which don't really correct
functionality?

Jan

Sure, "address" seems good to us.
Please, while committing, change the occurrences of "fix" into "address"
for the commit title and and commit description as well
(together with the tag change).

Regards
--
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®.