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

Re: [XEN PATCH v2] x86/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3



On 04/08/23 11:47, Andrew Cooper wrote:
On 04/08/2023 10:38 am, Federico Serafini wrote:
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index be2b10a391..e1d9b94007 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -5591,7 +5591,7 @@ int __init populate_pt_range(unsigned long virt, unsigned 
long nr_mfns)
   *
   * It is an error to call with present flags over an unpopulated range.
   */
-int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf)
+int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int flags)

I think both of these examples want to stay as nf (new flags).  Flags on
its own is ambiguous in context, and nf is a common shorthand in our
pagetable code.

And it will make the patch rather shorter.

~Andrew

The arm code has its own implementation of modify_xen_mappings()
which uses `flags`.
I put Stefano and Julien in CC, so that if everyone likes `nf` I can propagate the change.

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