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

Re: [XEN PATCH v2] xen/domain_page: address violations of MISRA C:2012 Rule 8.3



Hi,

On 31/10/2023 10:31, Jan Beulich wrote:
On 31.10.2023 10:25, Federico Serafini wrote:
Make function defintions and declarations consistent.

typo: s/defintions/definitions/

No functional change.

Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

However, ...

---
Changes in v2:
- use 'ptr' do denote a const void * parameter.

... not even this (let alone the description) clarifies what the
inconsistency was. I had to go check to figure that x86 already uses
"ptr". Such things could do with spelling out.

+1. The more that x86 was the "odd" one but it was chosen to use the variant everywhere.

With the commit message clarified:

Acked-by: Julien Grall <jgrall@xxxxxxxxxx>

Cheers,


@@ -55,8 +55,8 @@ static inline void *__map_domain_page_global(const struct 
page_info *pg)
#define map_domain_page(mfn) __mfn_to_virt(mfn_x(mfn))
  #define __map_domain_page(pg)               page_to_virt(pg)
-#define unmap_domain_page(va)               ((void)(va))
-#define domain_page_map_to_mfn(va)          _mfn(__virt_to_mfn((unsigned 
long)(va)))
+#define unmap_domain_page(ptr)               ((void)(ptr))
+#define domain_page_map_to_mfn(ptr)          _mfn(__virt_to_mfn((unsigned 
long)(ptr)))

Padding wants to not be screwed by the change (one of the blanks will
want dropping). I guess this can be taken care of while committing.

Jan

--
Julien Grall



 


Rackspace

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