mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
x86/io: Don't cast away constness in read{b..q}()
Addresses various MISRA R11.8 violations. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
2d8d7481ca
commit
9110072b76
1 file changed
+4
-4
@@ -4,10 +4,10 @@
|
||||
#include <xen/vmap.h>
|
||||
#include <xen/types.h>
|
||||
|
||||
#define readb(x) (*(volatile uint8_t *)(x))
|
||||
#define readw(x) (*(volatile uint16_t *)(x))
|
||||
#define readl(x) (*(volatile uint32_t *)(x))
|
||||
#define readq(x) (*(volatile uint64_t *)(x))
|
||||
#define readb(x) (*(const volatile uint8_t *)(x))
|
||||
#define readw(x) (*(const volatile uint16_t *)(x))
|
||||
#define readl(x) (*(const volatile uint32_t *)(x))
|
||||
#define readq(x) (*(const volatile uint64_t *)(x))
|
||||
#define writeb(d,x) (*(volatile uint8_t *)(x) = (d))
|
||||
#define writew(d,x) (*(volatile uint16_t *)(x) = (d))
|
||||
#define writel(d,x) (*(volatile uint32_t *)(x) = (d))
|
||||
|
||||