]> xenbits.xensource.com Git - xen.git/commitdiff
x86/pci: add suffix 'U' to PCI_CONF_ADDRESS macro
authorAlessandro Zucchelli <alessandro.zucchelli@bugseng.com>
Thu, 25 Apr 2024 07:52:51 +0000 (09:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Apr 2024 07:52:51 +0000 (09:52 +0200)
This addresses violations of MISRA C:2012 Rule 7.2 which states as
following: A ā€œuā€ or ā€œUā€ suffix shall be applied to all integer constants
that are represented in an unsigned type.

No functional change.

Signed-off-by: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/pci.c

index aad1c3f7cf7dda8660bf75a6d824d8f638723d40..8d33429103b9532b284af89ecd90e7f7b938ebc8 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/io.h>
 
 #define PCI_CONF_ADDRESS(sbdf, reg) \
-    (0x80000000 | ((sbdf).bdf << 8) | ((reg) & ~3))
+    (0x80000000U | ((sbdf).bdf << 8) | ((reg) & ~3))
 
 uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 {