diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-02-21 12:55:00 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-17 09:46:28 -0400 |
commit | b487c33e55eb7e18cd98094f7159c6d9e8b6bedd (patch) | |
tree | 56fe006bf392c090a8d2fcf2a2109055e3279fda /drivers/edac/amd64_edac.h | |
parent | d88977a9c433deb7e558e0af51092449ef2ad2dd (diff) |
amd64_edac: Fix node id signedness
A node id can never be negative since we use it as an index into
the DRAM ranges array. This also makes one of the BUG_ON conditions
redundant.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r-- | drivers/edac/amd64_edac.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index fe2cc3068d95..6220baeb3f1a 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h | |||
@@ -288,7 +288,7 @@ | |||
288 | #define MSR_MCGCTL_NBE BIT(4) | 288 | #define MSR_MCGCTL_NBE BIT(4) |
289 | 289 | ||
290 | /* AMD sets the first MC device at device ID 0x18. */ | 290 | /* AMD sets the first MC device at device ID 0x18. */ |
291 | static inline int get_node_id(struct pci_dev *pdev) | 291 | static inline u8 get_node_id(struct pci_dev *pdev) |
292 | { | 292 | { |
293 | return PCI_SLOT(pdev->devfn) - 0x18; | 293 | return PCI_SLOT(pdev->devfn) - 0x18; |
294 | } | 294 | } |
@@ -335,7 +335,7 @@ struct amd64_pvt { | |||
335 | /* pci_device handles which we utilize */ | 335 | /* pci_device handles which we utilize */ |
336 | struct pci_dev *F1, *F2, *F3; | 336 | struct pci_dev *F1, *F2, *F3; |
337 | 337 | ||
338 | int mc_node_id; /* MC index of this MC node */ | 338 | unsigned mc_node_id; /* MC index of this MC node */ |
339 | int ext_model; /* extended model value of this node */ | 339 | int ext_model; /* extended model value of this node */ |
340 | int channel_count; | 340 | int channel_count; |
341 | 341 | ||