aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2011-02-21 13:49:01 -0500
committerBorislav Petkov <borislav.petkov@amd.com>2011-03-17 09:46:33 -0400
commite761359a25c26b59c2c1ddcc180a441bb442a5ba (patch)
tree49e9f269bd045c71087abdafed66bb658187cf4e /drivers/edac
parent972ea17ab9116cca513a45526c93651d769fefc6 (diff)
amd64_edac: Fix ranges signedness
The dram ranges make sense only as an unsigned type. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/amd64_edac.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 9719f4aa1ad2..1b8fa7a905eb 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1226,7 +1226,7 @@ static u8 f1x_determine_channel(struct amd64_pvt *pvt, u64 sys_addr,
1226} 1226}
1227 1227
1228/* Convert the sys_addr to the normalized DCT address */ 1228/* Convert the sys_addr to the normalized DCT address */
1229static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, int range, 1229static u64 f1x_get_norm_dct_addr(struct amd64_pvt *pvt, unsigned range,
1230 u64 sys_addr, bool hi_rng, 1230 u64 sys_addr, bool hi_rng,
1231 u32 dct_sel_base_addr) 1231 u32 dct_sel_base_addr)
1232{ 1232{
@@ -1380,7 +1380,7 @@ static u64 f1x_swap_interleaved_region(struct amd64_pvt *pvt, u64 sys_addr)
1380} 1380}
1381 1381
1382/* For a given @dram_range, check if @sys_addr falls within it. */ 1382/* For a given @dram_range, check if @sys_addr falls within it. */
1383static int f1x_match_to_this_node(struct amd64_pvt *pvt, int range, 1383static int f1x_match_to_this_node(struct amd64_pvt *pvt, unsigned range,
1384 u64 sys_addr, int *nid, int *chan_sel) 1384 u64 sys_addr, int *nid, int *chan_sel)
1385{ 1385{
1386 int cs_found = -EINVAL; 1386 int cs_found = -EINVAL;
@@ -1468,7 +1468,8 @@ static int f1x_match_to_this_node(struct amd64_pvt *pvt, int range,
1468static int f1x_translate_sysaddr_to_cs(struct amd64_pvt *pvt, u64 sys_addr, 1468static int f1x_translate_sysaddr_to_cs(struct amd64_pvt *pvt, u64 sys_addr,
1469 int *node, int *chan_sel) 1469 int *node, int *chan_sel)
1470{ 1470{
1471 int range, cs_found = -EINVAL; 1471 int cs_found = -EINVAL;
1472 unsigned range;
1472 1473
1473 for (range = 0; range < DRAM_RANGES; range++) { 1474 for (range = 0; range < DRAM_RANGES; range++) {
1474 1475
@@ -1941,7 +1942,7 @@ static void read_mc_regs(struct amd64_pvt *pvt)
1941 struct cpuinfo_x86 *c = &boot_cpu_data; 1942 struct cpuinfo_x86 *c = &boot_cpu_data;
1942 u64 msr_val; 1943 u64 msr_val;
1943 u32 tmp; 1944 u32 tmp;
1944 int range; 1945 unsigned range;
1945 1946
1946 /* 1947 /*
1947 * Retrieve TOP_MEM and TOP_MEM2; no masking off of reserved bits since 1948 * Retrieve TOP_MEM and TOP_MEM2; no masking off of reserved bits since