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

Re: [XEN PATCH] atomic: change parameter name in atomic_cmpxchg() definition



Hello Julien,

On 21/07/23 17:44, Julien Grall wrote:> Title:

Please add "xen/arm: " to clarify this is a patch touching the Arm code.

Ok.

On 21/07/2023 16:37, Federico Serafini wrote:
Change parameter name from 'ptr' to 'v' in the function definition thus
addressing violations of MISRA C:2012 Rule 8.3: "All declarations of an
object or function shall use the same names and type qualifiers".

The parameters are consistent between arm32 and arm64. Naming wise, any reason you picked the x86 name? Personally, I have a slight preference to keep 'ptr' because this is more obvious than 'v'.
I picked 'v' because in xen/arch/arm/include/asm/arm64/atomic.h,
all the parameters having 'atomic_t *' type are named in that way.
The same is true for xen/include/xen/atomic.h.

If you prefer I can go for 'ptr'.

But I will not strongly argue against it. That said, if you are looking for consistency, you should also modify arm32.

Cheers,

After deciding what to do, I will propagate the change to arm32.

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