summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authoremilia <emilia@vegaa.systems>2023-08-27 22:24:34 +0000
committeremilia <emilia@vegaa.systems>2023-08-27 22:24:34 +0000
commit15d4bef9c8b47bde58b822fc9a3b41b77dd7348c (patch)
treeb0c6d66a44a072ba3bbbac23caae82829ec3267c /sys/include
parentc942744a648aae3ac891ebd9ea5e3efeabe0bcf2 (diff)
kernel: mmio: Fix type warnings
git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@41 a8a8aea2-181d-ee11-89e8-15fd0e089fc4
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/mmio.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/include/sys/mmio.h b/sys/include/sys/mmio.h
index 75f834b..8e3db52 100644
--- a/sys/include/sys/mmio.h
+++ b/sys/include/sys/mmio.h
@@ -52,10 +52,13 @@
static inline void \
mmio_write##SUFFIX(void *addr, TYPE val) \
{ \
- if (addr < VM_HIGHER_HALF) { \
- addr += VM_HIGHER_HALF; \
+ uintptr_t tmp; \
+ \
+ tmp = (uintptr_t)addr; \
+ if (tmp < VM_HIGHER_HALF) { \
+ tmp += VM_HIGHER_HALF; \
} \
- *(volatile TYPE *)addr = val; \
+ *(volatile TYPE *)tmp = val; \
}
/*