forked from Minki/linux
drivers/edac: Lindent e7xxx
Lindent cleanup of e7xxx_edac driver Signed-off-by: Dave Jiang <djiang@mvista.com> Signed-off-by: Douglas Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f4aff42653
commit
849a4c375a
@ -147,20 +147,16 @@ struct e7xxx_error_info {
|
||||
static const struct e7xxx_dev_info e7xxx_devs[] = {
|
||||
[E7500] = {
|
||||
.err_dev = PCI_DEVICE_ID_INTEL_7500_1_ERR,
|
||||
.ctl_name = "E7500"
|
||||
},
|
||||
.ctl_name = "E7500"},
|
||||
[E7501] = {
|
||||
.err_dev = PCI_DEVICE_ID_INTEL_7501_1_ERR,
|
||||
.ctl_name = "E7501"
|
||||
},
|
||||
.ctl_name = "E7501"},
|
||||
[E7505] = {
|
||||
.err_dev = PCI_DEVICE_ID_INTEL_7505_1_ERR,
|
||||
.ctl_name = "E7505"
|
||||
},
|
||||
.ctl_name = "E7505"},
|
||||
[E7205] = {
|
||||
.err_dev = PCI_DEVICE_ID_INTEL_7205_1_ERR,
|
||||
.ctl_name = "E7205"
|
||||
},
|
||||
.ctl_name = "E7205"},
|
||||
};
|
||||
|
||||
/* FIXME - is this valid for both SECDED and S4ECD4ED? */
|
||||
@ -201,8 +197,7 @@ static unsigned long ctl_page_to_phys(struct mem_ctl_info *mci,
|
||||
return pvt->tolm - 1;
|
||||
}
|
||||
|
||||
static void process_ce(struct mem_ctl_info *mci,
|
||||
struct e7xxx_error_info *info)
|
||||
static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
|
||||
{
|
||||
u32 error_1b, page;
|
||||
u16 syndrome;
|
||||
@ -229,8 +224,7 @@ static void process_ce_no_info(struct mem_ctl_info *mci)
|
||||
edac_mc_handle_ce_no_info(mci, "e7xxx CE log register overflow");
|
||||
}
|
||||
|
||||
static void process_ue(struct mem_ctl_info *mci,
|
||||
struct e7xxx_error_info *info)
|
||||
static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
|
||||
{
|
||||
u32 error_2b, block_page;
|
||||
int row;
|
||||
@ -256,10 +250,8 @@ static void e7xxx_get_error_info (struct mem_ctl_info *mci,
|
||||
struct e7xxx_pvt *pvt;
|
||||
|
||||
pvt = (struct e7xxx_pvt *)mci->pvt_info;
|
||||
pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_FERR,
|
||||
&info->dram_ferr);
|
||||
pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_NERR,
|
||||
&info->dram_nerr);
|
||||
pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_FERR, &info->dram_ferr);
|
||||
pci_read_config_byte(pvt->bridge_ck, E7XXX_DRAM_NERR, &info->dram_nerr);
|
||||
|
||||
if ((info->dram_ferr & 1) || (info->dram_nerr & 1)) {
|
||||
pci_read_config_dword(pvt->bridge_ck, E7XXX_DRAM_CELOG_ADD,
|
||||
@ -281,7 +273,8 @@ static void e7xxx_get_error_info (struct mem_ctl_info *mci,
|
||||
}
|
||||
|
||||
static int e7xxx_process_error_info(struct mem_ctl_info *mci,
|
||||
struct e7xxx_error_info *info, int handle_errors)
|
||||
struct e7xxx_error_info *info,
|
||||
int handle_errors)
|
||||
{
|
||||
int error_found;
|
||||
|
||||
@ -342,7 +335,6 @@ static inline int dual_channel_active(u32 drc, int dev_idx)
|
||||
return (dev_idx == E7501) ? ((drc >> 22) & 0x1) : 1;
|
||||
}
|
||||
|
||||
|
||||
/* Return DRB granularity (0=32mb, 1=64mb). */
|
||||
static inline int drb_granularity(u32 drc, int dev_idx)
|
||||
{
|
||||
@ -350,7 +342,6 @@ static inline int drb_granularity(u32 drc, int dev_idx)
|
||||
return (dev_idx == E7501) ? ((drc >> 18) & 0x3) : 1;
|
||||
}
|
||||
|
||||
|
||||
static void e7xxx_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev,
|
||||
int dev_idx, u32 drc)
|
||||
{
|
||||
@ -451,8 +442,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
|
||||
pvt = (struct e7xxx_pvt *)mci->pvt_info;
|
||||
pvt->dev_info = &e7xxx_devs[dev_idx];
|
||||
pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
|
||||
pvt->dev_info->err_dev,
|
||||
pvt->bridge_ck);
|
||||
pvt->dev_info->err_dev, pvt->bridge_ck);
|
||||
|
||||
if (!pvt->bridge_ck) {
|
||||
e7xxx_printk(KERN_ERR, "error reporting device not found:"
|
||||
@ -533,20 +523,16 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
|
||||
static const struct pci_device_id e7xxx_pci_tbl[] __devinitdata = {
|
||||
{
|
||||
PCI_VEND_DEV(INTEL, 7205_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
E7205
|
||||
},
|
||||
E7205},
|
||||
{
|
||||
PCI_VEND_DEV(INTEL, 7500_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
E7500
|
||||
},
|
||||
E7500},
|
||||
{
|
||||
PCI_VEND_DEV(INTEL, 7501_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
E7501
|
||||
},
|
||||
E7501},
|
||||
{
|
||||
PCI_VEND_DEV(INTEL, 7505_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
E7505
|
||||
},
|
||||
E7505},
|
||||
{
|
||||
0,
|
||||
} /* 0 terminated list. */
|
||||
|
Loading…
Reference in New Issue
Block a user