diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-02-21 18:55:00 +0100 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-17 14:46:28 +0100 |
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 fe2cc3068d9..6220baeb3f1 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h @@ -288,7 +288,7 @@ #define MSR_MCGCTL_NBE BIT(4) /* AMD sets the first MC device at device ID 0x18. */ -static inline int get_node_id(struct pci_dev *pdev) +static inline u8 get_node_id(struct pci_dev *pdev) { return PCI_SLOT(pdev->devfn) - 0x18; } @@ -335,7 +335,7 @@ struct amd64_pvt { /* pci_device handles which we utilize */ struct pci_dev *F1, *F2, *F3; - int mc_node_id; /* MC index of this MC node */ + unsigned mc_node_id; /* MC index of this MC node */ int ext_model; /* extended model value of this node */ int channel_count; |