diff mbox series

[XEN,v5,2/3] xen/pdx: amend definition of PDX_GROUP_COUNT

Message ID 9ae508ee09f7102b10ae742749b43d4fc9f04649.1700724350.git.nicola.vetrini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series address violations of MISRA C:2012 Rule 10.1 | expand

Commit Message

Nicola Vetrini Nov. 23, 2023, 7:37 a.m. UTC
The definition of PDX_GROUP_COUNT causes violations of
MISRA C:2012 Rule 10.1, therefore the problematic part now uses
the ISOLATE_LSB macro, which encapsulates the pattern.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
Changes in v4:
- Changed macro name.
Changes in v5:
- Changed macro name.
---
 xen/include/xen/pdx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/xen/include/xen/pdx.h b/xen/include/xen/pdx.h
index bd535009ea8f..23f3956db8db 100644
--- a/xen/include/xen/pdx.h
+++ b/xen/include/xen/pdx.h
@@ -70,7 +70,7 @@ 
 extern unsigned long max_pdx;
 
 #define PDX_GROUP_COUNT ((1 << PDX_GROUP_SHIFT) / \
-                         (sizeof(*frame_table) & -sizeof(*frame_table)))
+                         (ISOLATE_LSB(sizeof(*frame_table))))
 extern unsigned long pdx_group_valid[];
 
 /**