summaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.h
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2011-02-21 19:33:10 +0100
committerBorislav Petkov <borislav.petkov@amd.com>2011-03-17 14:46:30 +0100
commit151fa71c581d1295f3f44f4882ceb17ca014dc8d (patch)
treeb5987d55156426eec04a85af5b300a1a30c7cd36 /drivers/edac/amd64_edac.h
parentamd64_edac: Fix node id signedness (diff)
downloadlinux-151fa71c581d1295f3f44f4882ceb17ca014dc8d.tar.xz
linux-151fa71c581d1295f3f44f4882ceb17ca014dc8d.zip
amd64_edac: Fix DRAM base macros
Return unsigned u8 values only. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r--drivers/edac/amd64_edac.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index 6220baeb3f1a..11be36a311eb 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -180,10 +180,10 @@
#define DRAM_BASE_LO 0x40
#define DRAM_LIMIT_LO 0x44
-#define dram_intlv_en(pvt, i) ((pvt->ranges[i].base.lo >> 8) & 0x7)
-#define dram_rw(pvt, i) (pvt->ranges[i].base.lo & 0x3)
-#define dram_intlv_sel(pvt, i) ((pvt->ranges[i].lim.lo >> 8) & 0x7)
-#define dram_dst_node(pvt, i) (pvt->ranges[i].lim.lo & 0x7)
+#define dram_intlv_en(pvt, i) ((u8)((pvt->ranges[i].base.lo >> 8) & 0x7))
+#define dram_rw(pvt, i) ((u8)(pvt->ranges[i].base.lo & 0x3))
+#define dram_intlv_sel(pvt, i) ((u8)((pvt->ranges[i].lim.lo >> 8) & 0x7))
+#define dram_dst_node(pvt, i) ((u8)(pvt->ranges[i].lim.lo & 0x7))
#define DHAR 0xf0
#define dhar_valid(pvt) ((pvt)->dhar & BIT(0))