From 15d4bef9c8b47bde58b822fc9a3b41b77dd7348c Mon Sep 17 00:00:00 2001 From: emilia Date: Sun, 27 Aug 2023 22:24:34 +0000 Subject: kernel: mmio: Fix type warnings git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@41 a8a8aea2-181d-ee11-89e8-15fd0e089fc4 --- sys/include/sys/mmio.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/include') 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; \ } /* -- cgit v1.2.3