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

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



On 14/08/23 09:14, Jan Beulich wrote:
On 12.08.2023 00:30, Stefano Stabellini wrote:
On Fri, 11 Aug 2023, Federico Serafini wrote:
--- a/xen/include/hypercall-defs.c
+++ b/xen/include/hypercall-defs.c
@@ -107,11 +107,16 @@ defhandle: physdev_op_compat_t
  prefix: do PREFIX_hvm PREFIX_compat PREFIX_do_arm
  physdev_op(int cmd, void *arg)
-prefix: do PREFIX_hvm PREFIX_compat
+prefix: do PREFIX_hvm
  #if defined(CONFIG_GRANT_TABLE) || defined(CONFIG_PV_SHIM)
  grant_table_op(unsigned int cmd, void *uop, unsigned int count)
  #endif
+prefix: PREFIX_compat
+#if defined(CONFIG_GRANT_TABLE) || defined(CONFIG_PV_SHIM)
+grant_table_op(unsigned int cmd, void *cmp_uop, unsigned int count)
+#endif

Everything checks out, so:

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

The other changes are uncontroversial. This one about splitting out the
compat version of grant_table_op is not great. I wonder if it would be
better to rename cmp_uop to uop in xen/common/compat/grant_table.c. I'll
let Jan and the others decide I am OK either way.

Would there be anything wrong with instead renaming compat_grant_table_op()'s
respective parameter?

Jan

As far as I know, there would be nothing wrong with MISRA.

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