aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.h
diff options
context:
space:
mode:
authorDaniel J Blueman <daniel@numascale-asia.com>2012-11-30 03:44:20 -0500
committerBorislav Petkov <bp@suse.de>2013-01-10 10:18:00 -0500
commitc7e5301a1b7c3f47af635a8b1b14480b81426025 (patch)
tree29892bae948424292eb9b2f07610b7d579ab1417 /drivers/edac/amd64_edac.h
parente2c0bffea2574c088d86a9f1f661a84bc8fea2fd (diff)
amd64_edac: Fix type usage in NB IDs and memory ranges
Use appropriate types for northbridge IDs and memory ranges. Mark immutable data const and keep within compilation unit on related structures. Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com> Link: http://lkml.kernel.org/r/1354265060-22956-2-git-send-email-daniel@numascale-asia.com [Boris: Drop arg change to node_to_amd_nb] Signed-off-by: Borislav Petkov <bp@alien8.de>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r--drivers/edac/amd64_edac.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index cd7845fcc272..35637d83f235 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -334,7 +334,7 @@ struct amd64_pvt {
334 /* pci_device handles which we utilize */ 334 /* pci_device handles which we utilize */
335 struct pci_dev *F1, *F2, *F3; 335 struct pci_dev *F1, *F2, *F3;
336 336
337 unsigned mc_node_id; /* MC index of this MC node */ 337 u16 mc_node_id; /* MC index of this MC node */
338 int ext_model; /* extended model value of this node */ 338 int ext_model; /* extended model value of this node */
339 int channel_count; 339 int channel_count;
340 340
@@ -387,7 +387,7 @@ struct err_info {
387 u32 offset; 387 u32 offset;
388}; 388};
389 389
390static inline u64 get_dram_base(struct amd64_pvt *pvt, unsigned i) 390static inline u64 get_dram_base(struct amd64_pvt *pvt, u8 i)
391{ 391{
392 u64 addr = ((u64)pvt->ranges[i].base.lo & 0xffff0000) << 8; 392 u64 addr = ((u64)pvt->ranges[i].base.lo & 0xffff0000) << 8;
393 393
@@ -397,7 +397,7 @@ static inline u64 get_dram_base(struct amd64_pvt *pvt, unsigned i)
397 return (((u64)pvt->ranges[i].base.hi & 0x000000ff) << 40) | addr; 397 return (((u64)pvt->ranges[i].base.hi & 0x000000ff) << 40) | addr;
398} 398}
399 399
400static inline u64 get_dram_limit(struct amd64_pvt *pvt, unsigned i) 400static inline u64 get_dram_limit(struct amd64_pvt *pvt, u8 i)
401{ 401{
402 u64 lim = (((u64)pvt->ranges[i].lim.lo & 0xffff0000) << 8) | 0x00ffffff; 402 u64 lim = (((u64)pvt->ranges[i].lim.lo & 0xffff0000) << 8) | 0x00ffffff;
403 403