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

[PATCH 3/4] xen/param: address violation of MISRA C Rule 20.7


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Nicola Vetrini <nicola.vetrini@xxxxxxxxx>
  • Date: Thu, 20 Nov 2025 20:32:55 +0100
  • Arc-authentication-results: i=1; bugseng.com; arc=none smtp.remote-ip=93.44.185.120
  • Arc-message-signature: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; c=relaxed/relaxed; t=1763667203; h=From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=p+U0aUwybu1dMebZr+nA1KTxVn7l5e18ZGuPyuhBnFA=; b=pPECHZBWjbPJigRcydEutV7RYj4MEDnh2ERiWqzWS0w0R4l9TreD8y2/2iVddA6Mphs9 DsV5cLk+JL7r7Eny5jT2IgmMGZuxnOx7cAplIjyolFYf7xCvKda5JBWc68hRhcjqJ4xwe vL4EDdzTRuphnDSBYfoMOjooaumNQ/jaKx/sC/rG6b85qmTzWaDciKLONGd8wmMpc8X95 JT3XFxcGzGDYT7/0FMp+l1Cy+uDCrMdNWLpOHwwpwNRpwy0tVN7H/OttCx2gpVrsCbw9w 9ANAKRrBF+YIe/bIdeWbmm07XL3913iGOiQVzUrg9KYShBVh0iX/B3W90VQGML29nBvhy xLBnGpw05wVBcz89WdheVPUvgiNJxPSQ8N/1rXY1EgCF3n6dftPpGImwZ/vXYx2/Q/CRq tiap80D93zrVinPOr8TfUuV4gIExh2Y7T7WavwA36v7g5QUDfIY/qHaRD1K08ShhuBzyQ UhpJX4H4USCA6C74Qs1Eez7nhwPNQ7dj8rIk7pkxZMmN4qBOFhCsqovcHKSBQ8wpdGzej dyt/I+EaHW5qSDS1sS2CqAhlzRxSvcQDt1v7vN5Ing5d4/Jb5U4WmgrTaxwk5yOKcMCyn /PyYGFNuBTHZN0Fljh+UV0kdv6R2gnh68LsKrnvvKATCcirY+Jx4G8Ag7/mu1/Y=
  • Arc-seal: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; cv=none; t=1763667203; b=GrDXwHjA3XSgMz0xYcqYjAuYcdFmjFi+pkddUjx+bblxNBA5qPsyeUq5fkRStd6/a0oL lgpXoNA2HCyWMlTacHLDNMDmSDU4pGrpPkNk78DFYspd7sqrNjS/jydy5Zkpyf/TErwW3 sOSXU24rpTK3s7jykz1+U9QJ8PiFJysElb/h/Lz6YkNQjzXLBEBGAjwxI+7/ioBQM0qly RzmxNI9Ecgywl4Tm431GnM8l3PzRfs2OLm/RUB2HzGP4lr+1UKLGouGIIth8wYFp9/QC3 b+iCbIxsUmJIF3uMCfOTl0l9E4YjFwxSTNJ/4Q3RXZIBdyTI8Sybg1NMJ28yiPSstFcIq InbOhk1kdC0f1I/eAAe0G4sssikXU/CVQvHTSWbUd/g0RzB50FkTZKM42iR+ir7cZ4jLh nIMkoiBeZ8DTRUAA1cGuqqpQyZ9z+o03igm/Iaq1kbX4/PbTaGeQ44/JdEjv4bR/+6Qka iiFpQpw93QTdCZXaVOW9Dc+djqdULba2/ob7LLsEsdNU1hyGKQD0cRv3U/tbJluOnzqIi TU9XITGu0sKI7cL5pQ5EUN8LoQdU9OtYaNue3mqgycRVTBGZmPnCbo99rNMZxRSkvN8Ih oiqP9VeOtXNIibPC2EEjEn2kczNmroXwdS1OnCC9yg5sex0jF+RjeorcrTSlWX0=
  • Authentication-results: bugseng.com; arc=none smtp.remote-ip=93.44.185.120
  • Cc: andrew.cooper3@xxxxxxxxxx, jbeulich@xxxxxxxx, sstabellini@xxxxxxxxxx, Nicola Vetrini <nicola.vetrini@xxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 20 Nov 2025 19:33:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The rule states: Expressions resulting from the expansion of
macro parameters shall be enclosed in parentheses.

Add parentheses in the defition of `custom_runtime_var_sz' to
address the violations.

No functional change.

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

diff --git a/xen/include/xen/param.h b/xen/include/xen/param.h
index 1bdbab34ab..f5a2189400 100644
--- a/xen/include/xen/param.h
+++ b/xen/include/xen/param.h
@@ -102,8 +102,8 @@ extern struct param_hypfs __paramhypfs_start[], 
__paramhypfs_end[];
 
 #define custom_runtime_set_var_sz(parfs, var, sz) \
     { \
-        (parfs)->hypfs.u.content = var; \
-        (parfs)->hypfs.e.max_size = sz; \
+        (parfs)->hypfs.u.content = (var); \
+        (parfs)->hypfs.e.max_size = (sz); \
         (parfs)->hypfs.e.size = strlen(var) + 1; \
     }
 #define custom_runtime_set_var(parfs, var) \
-- 
2.51.2




 


Rackspace

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