drivers/edac: Lindent i3000

Lindent cleanup of i3000_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:
Dave Jiang
2007-07-19 01:50:04 -07:00
committed by Linus Torvalds
parent 849a4c375a
commit 36b8289e24

View File

@@ -130,7 +130,6 @@
* 30:0 reserved * 30:0 reserved
*/ */
enum i3000p_chips { enum i3000p_chips {
I3000 = 0, I3000 = 0,
}; };
@@ -149,8 +148,7 @@ struct i3000_error_info {
static const struct i3000_dev_info i3000_devs[] = { static const struct i3000_dev_info i3000_devs[] = {
[I3000] = { [I3000] = {
.ctl_name = "i3000" .ctl_name = "i3000"},
},
}; };
static struct pci_dev *mci_pdev = NULL; static struct pci_dev *mci_pdev = NULL;
@@ -183,22 +181,21 @@ static void i3000_get_error_info(struct mem_ctl_info *mci,
* should be UE info. * should be UE info.
*/ */
if ((info->errsts ^ info->errsts2) & I3000_ERRSTS_BITS) { if ((info->errsts ^ info->errsts2) & I3000_ERRSTS_BITS) {
pci_read_config_byte(pdev, I3000_EDEAP, pci_read_config_byte(pdev, I3000_EDEAP, &info->edeap);
&info->edeap); pci_read_config_dword(pdev, I3000_DEAP, &info->deap);
pci_read_config_dword(pdev, I3000_DEAP, pci_read_config_byte(pdev, I3000_DERRSYN, &info->derrsyn);
&info->deap);
pci_read_config_byte(pdev, I3000_DERRSYN,
&info->derrsyn);
} }
/* Clear any error bits. /* Clear any error bits.
* (Yes, we really clear bits by writing 1 to them.) * (Yes, we really clear bits by writing 1 to them.)
*/ */
pci_write_bits16(pdev, I3000_ERRSTS, I3000_ERRSTS_BITS, I3000_ERRSTS_BITS); pci_write_bits16(pdev, I3000_ERRSTS, I3000_ERRSTS_BITS,
I3000_ERRSTS_BITS);
} }
static int i3000_process_error_info(struct mem_ctl_info *mci, static int i3000_process_error_info(struct mem_ctl_info *mci,
struct i3000_error_info *info, int handle_errors) struct i3000_error_info *info,
int handle_errors)
{ {
int row, multi_chan; int row, multi_chan;
int pfn, offset, channel; int pfn, offset, channel;
@@ -226,8 +223,7 @@ static int i3000_process_error_info(struct mem_ctl_info *mci,
edac_mc_handle_ue(mci, pfn, offset, row, "i3000 UE"); edac_mc_handle_ue(mci, pfn, offset, row, "i3000 UE");
else else
edac_mc_handle_ce(mci, pfn, offset, info->derrsyn, row, edac_mc_handle_ce(mci, pfn, offset, info->derrsyn, row,
multi_chan ? channel : 0, multi_chan ? channel : 0, "i3000 CE");
"i3000 CE");
return 1; return 1;
} }
@@ -285,7 +281,8 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
mchbar &= I3000_MCHBAR_MASK; mchbar &= I3000_MCHBAR_MASK;
window = ioremap_nocache(mchbar, I3000_MMR_WINDOW_SIZE); window = ioremap_nocache(mchbar, I3000_MMR_WINDOW_SIZE);
if (!window) { if (!window) {
printk(KERN_ERR "i3000: cannot map mmio space at 0x%lx\n", mchbar); printk(KERN_ERR "i3000: cannot map mmio space at 0x%lx\n",
mchbar);
return -ENODEV; return -ENODEV;
} }
@@ -367,7 +364,8 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
/* Clear any error bits. /* Clear any error bits.
* (Yes, we really clear bits by writing 1 to them.) * (Yes, we really clear bits by writing 1 to them.)
*/ */
pci_write_bits16(pdev, I3000_ERRSTS, I3000_ERRSTS_BITS, I3000_ERRSTS_BITS); pci_write_bits16(pdev, I3000_ERRSTS, I3000_ERRSTS_BITS,
I3000_ERRSTS_BITS);
rc = -ENODEV; rc = -ENODEV;
if (edac_mc_add_mc(mci, 0)) { if (edac_mc_add_mc(mci, 0)) {
@@ -419,8 +417,7 @@ static void __devexit i3000_remove_one(struct pci_dev *pdev)
static const struct pci_device_id i3000_pci_tbl[] __devinitdata = { static const struct pci_device_id i3000_pci_tbl[] __devinitdata = {
{ {
PCI_VEND_DEV(INTEL, 3000_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0, PCI_VEND_DEV(INTEL, 3000_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
I3000 I3000},
},
{ {
0, 0,
} /* 0 terminated list. */ } /* 0 terminated list. */