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

Re: [XEN PATCH 1/4] xen/arm: address violations of MISRA C:2012 Rule 13.1



On 20/10/23 10:28, Julien Grall wrote:
Hi Stefano,

On 19/10/2023 19:30, Stefano Stabellini wrote:
We usually use this trick when 'current' is used multiple time to save
process (using 'current' is not cost free). But in this case, this is
renaming without any apparent benefits.

If we wanted to go down this route, then this would likely want a comment.
At which point we should just deviate.

I will have a think if there are something else we can do. Could we consider
to not address it for now?


I totally agree.

I am wondering if we could deviate "current" because even with the
implementation using volatile we know it doesn't have "side effects" in
the sense of changing things for other code outside the function.

I will let Simone to confirm whether it is possible to do it from a technical point of view.

Yes, it is possible.

Leaving the technical part aside, is the only violations are the one in this patch? If so, I don't think it makes sense to deviate 'current' globally. It would be better to have local deviations.

Cheers,

For this specific case I agree in using a local deviation.
In the next version of the patch, I will use a SAF comment.

--
Simone Ballarin, M.Sc.

Field Application Engineer, BUGSENG (https://bugseng.com)




 


Rackspace

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