summaryrefslogtreecommitdiff
path: root/memlayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'memlayout.h')
-rw-r--r--memlayout.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/memlayout.h b/memlayout.h
index 70c1968..d1615f7 100644
--- a/memlayout.h
+++ b/memlayout.h
@@ -9,7 +9,7 @@
#define KERNLINK (KERNBASE+EXTMEM) // Address where kernel is linked
#define V2P(a) (((uint) (a)) - KERNBASE)
-#define P2V(a) (((void *) (a)) + KERNBASE)
+#define P2V(a) ((void *)(((char *) (a)) + KERNBASE))
#define V2P_WO(x) ((x) - KERNBASE) // same as V2P, but without casts
#define P2V_WO(x) ((x) + KERNBASE) // same as P2V, but without casts