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

Re: [RFC PATCH 05/18] arm: cppcheck: fix misra rule 20.7 on arm/include/asm/string.h



Hi Jan,

On 20/12/2022 09:38, Jan Beulich wrote:
On 20.12.2022 10:12, Julien Grall wrote:
On 20/12/2022 08:50, Luca Fancellu wrote:
Cppcheck has found a violation of rule 20.7 for the macro memset
about missing parenthesis for the "n" argument, while the parenthesis
are not mandatory because the argument is never used in an
expression, adding them will not harm code and readability, so fix
the finding adding parenthesis for the argument.

This is something I have argued against in the past (see [1]). So...


Eclair and coverity does not report this finding.

... if neither Eclair nor Coverity report it then I think this should be
a bug report against Cppcheck.

Furthermore in reply to my "Arm32: tidy the memset() macro" you said [1]

"In this case, Linux has removed __memzero() is patch ff5fdafc9e97 "ARM:
  8745/1: get rid of __memzero()" because the performance difference with
  memset() was limited. For Xen, I think we should also remove the function."

So either you want to follow that route, or it would rather be my patch
which ought to be considered for merging, not the least because it also
deals with yet another MISRA violation.

I forgot that discussion, thanks for the reminder! I would still prefer if we port the Linux change to Xen.

Cheers,

--
Julien Grall



 


Rackspace

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