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

Re: [PATCH 1/4] xen/xsm: address violations of MISRA C rules 8.3 and 7.2


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 25 Nov 2025 09:52:50 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764082375; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=YxyBSs827jprtHBHXV4PwXcAAh3LrjjfS7ftNklC6V4=; b=bxlf5+p/PcTjF7ISAVptncW4MHHUn91c/a5NMpILF9NfDDPPpWoeeTrzt3qLSO5iEHmt5uRC3vKcm8vyew84yXNtxsUcUBUbwPcpNBkPD+Hpf+V3lc0WJv7ffDwj+iZsaqOX3OUZ5JjLsKjQR4BUujOPnAtD1R73Rt6D8RcKeGU=
  • Arc-seal: i=1; a=rsa-sha256; t=1764082375; cv=none; d=zohomail.com; s=zohoarc; b=haVKs9RlIE9Zd7bd+9pNto2qrt2WP9DYMc/kyUWhrSF9vabrFzqzZne880A5tsUh+4383ngn4vcYS+tdGWLJZgOELK+i981jHcf8oTjFbptIlr/F/HyAQdTXzFjwGNIKBH5RglMoa4Xvwk7CGC7VyyCZAHoRmIHwYBA2AFR54Lc=
  • Cc: andrew.cooper3@xxxxxxxxxx, jbeulich@xxxxxxxx, sstabellini@xxxxxxxxxx
  • Delivery-date: Tue, 25 Nov 2025 14:53:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11/20/25 2:32 PM, Nicola Vetrini wrote:
Rule 8.3 states: Function types shall be in prototype form
with named parameters.

add parameter to 'has_xsm_magic' to make it consistent with the
definition.

Rule 7.2 states: A `u' or `U' suffix shall be applied to all
integer constants that are represented in an unsigned type.

add missing `U' to both #define for `XSM_MAGIC` for consistency.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxx>
---
  xen/include/xsm/xsm.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 9a23d2827c..074d61cd45 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -22,9 +22,9 @@
  typedef uint32_t xsm_magic_t;
#ifdef CONFIG_XSM_FLASK
-#define XSM_MAGIC 0xf97cff8c
+#define XSM_MAGIC 0xf97cff8cU
  #else
-#define XSM_MAGIC 0x0
+#define XSM_MAGIC 0x0U
  #endif
/*
@@ -815,7 +815,7 @@ int xsm_multiboot_policy_init(
   */
  int xsm_dt_init(void);
  int xsm_dt_policy_init(void **policy_buffer, size_t *policy_size);
-bool has_xsm_magic(paddr_t);
+bool has_xsm_magic(paddr_t start);
  #endif
void xsm_fixup_ops(struct xsm_ops *ops);

Acked-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>




 


Rackspace

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