aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i82860_edac.c
diff options
context:
space:
mode:
authorDave Jiang <djiang@mvista.com>2007-07-19 04:50:04 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:54 -0400
commitb4e8b37201d647e4b4abb89d57ebdb8c739d5405 (patch)
treed8ad0ebd1d2b4bfc2a2650a303dc03630ecf20d8 /drivers/edac/i82860_edac.c
parent36b8289e249f800a57a4c908a9a7e91345f516ef (diff)
drivers/edac: Lindent i82860
Lindent cleanup of i82860 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>
Diffstat (limited to 'drivers/edac/i82860_edac.c')
-rw-r--r--drivers/edac/i82860_edac.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
index 183427853d04..bd7bbb733f79 100644
--- a/drivers/edac/i82860_edac.c
+++ b/drivers/edac/i82860_edac.c
@@ -54,8 +54,7 @@ struct i82860_error_info {
54 54
55static const struct i82860_dev_info i82860_devs[] = { 55static const struct i82860_dev_info i82860_devs[] = {
56 [I82860] = { 56 [I82860] = {
57 .ctl_name = "i82860" 57 .ctl_name = "i82860"},
58 },
59}; 58};
60 59
61static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code 60static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code
@@ -63,7 +62,7 @@ static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code
63 */ 62 */
64 63
65static void i82860_get_error_info(struct mem_ctl_info *mci, 64static void i82860_get_error_info(struct mem_ctl_info *mci,
66 struct i82860_error_info *info) 65 struct i82860_error_info *info)
67{ 66{
68 struct pci_dev *pdev; 67 struct pci_dev *pdev;
69 68
@@ -91,13 +90,13 @@ static void i82860_get_error_info(struct mem_ctl_info *mci,
91 90
92 if ((info->errsts ^ info->errsts2) & 0x0003) { 91 if ((info->errsts ^ info->errsts2) & 0x0003) {
93 pci_read_config_dword(pdev, I82860_EAP, &info->eap); 92 pci_read_config_dword(pdev, I82860_EAP, &info->eap);
94 pci_read_config_word(pdev, I82860_DERRCTL_STS, 93 pci_read_config_word(pdev, I82860_DERRCTL_STS, &info->derrsyn);
95 &info->derrsyn);
96 } 94 }
97} 95}
98 96
99static int i82860_process_error_info(struct mem_ctl_info *mci, 97static int i82860_process_error_info(struct mem_ctl_info *mci,
100 struct i82860_error_info *info, int handle_errors) 98 struct i82860_error_info *info,
99 int handle_errors)
101{ 100{
102 int row; 101 int row;
103 102
@@ -119,7 +118,7 @@ static int i82860_process_error_info(struct mem_ctl_info *mci,
119 edac_mc_handle_ue(mci, info->eap, 0, row, "i82860 UE"); 118 edac_mc_handle_ue(mci, info->eap, 0, row, "i82860 UE");
120 else 119 else
121 edac_mc_handle_ce(mci, info->eap, 0, info->derrsyn, row, 0, 120 edac_mc_handle_ce(mci, info->eap, 0, info->derrsyn, row, 0,
122 "i82860 UE"); 121 "i82860 UE");
123 122
124 return 1; 123 return 1;
125} 124}
@@ -136,7 +135,7 @@ static void i82860_check(struct mem_ctl_info *mci)
136static void i82860_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev) 135static void i82860_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev)
137{ 136{
138 unsigned long last_cumul_size; 137 unsigned long last_cumul_size;
139 u16 mchcfg_ddim; /* DRAM Data Integrity Mode 0=none, 2=edac */ 138 u16 mchcfg_ddim; /* DRAM Data Integrity Mode 0=none, 2=edac */
140 u16 value; 139 u16 value;
141 u32 cumul_size; 140 u32 cumul_size;
142 struct csrow_info *csrow; 141 struct csrow_info *csrow;
@@ -204,12 +203,12 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
204 mci->edac_check = i82860_check; 203 mci->edac_check = i82860_check;
205 mci->ctl_page_to_phys = NULL; 204 mci->ctl_page_to_phys = NULL;
206 i82860_init_csrows(mci, pdev); 205 i82860_init_csrows(mci, pdev);
207 i82860_get_error_info(mci, &discard); /* clear counters */ 206 i82860_get_error_info(mci, &discard); /* clear counters */
208 207
209 /* Here we assume that we will never see multiple instances of this 208 /* Here we assume that we will never see multiple instances of this
210 * type of memory controller. The ID is therefore hardcoded to 0. 209 * type of memory controller. The ID is therefore hardcoded to 0.
211 */ 210 */
212 if (edac_mc_add_mc(mci,0)) { 211 if (edac_mc_add_mc(mci, 0)) {
213 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 212 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
214 goto fail; 213 goto fail;
215 } 214 }
@@ -219,14 +218,14 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
219 218
220 return 0; 219 return 0;
221 220
222fail: 221 fail:
223 edac_mc_free(mci); 222 edac_mc_free(mci);
224 return -ENODEV; 223 return -ENODEV;
225} 224}
226 225
227/* returns count (>= 0), or negative on error */ 226/* returns count (>= 0), or negative on error */
228static int __devinit i82860_init_one(struct pci_dev *pdev, 227static int __devinit i82860_init_one(struct pci_dev *pdev,
229 const struct pci_device_id *ent) 228 const struct pci_device_id *ent)
230{ 229{
231 int rc; 230 int rc;
232 231
@@ -258,12 +257,11 @@ static void __devexit i82860_remove_one(struct pci_dev *pdev)
258 257
259static const struct pci_device_id i82860_pci_tbl[] __devinitdata = { 258static const struct pci_device_id i82860_pci_tbl[] __devinitdata = {
260 { 259 {
261 PCI_VEND_DEV(INTEL, 82860_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0, 260 PCI_VEND_DEV(INTEL, 82860_0), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
262 I82860 261 I82860},
263 },
264 { 262 {
265 0, 263 0,
266 } /* 0 terminated list. */ 264 } /* 0 terminated list. */
267}; 265};
268 266
269MODULE_DEVICE_TABLE(pci, i82860_pci_tbl); 267MODULE_DEVICE_TABLE(pci, i82860_pci_tbl);
@@ -286,7 +284,7 @@ static int __init i82860_init(void)
286 284
287 if (!mci_pdev) { 285 if (!mci_pdev) {
288 mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 286 mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
289 PCI_DEVICE_ID_INTEL_82860_0, NULL); 287 PCI_DEVICE_ID_INTEL_82860_0, NULL);
290 288
291 if (mci_pdev == NULL) { 289 if (mci_pdev == NULL) {
292 debugf0("860 pci_get_device fail\n"); 290 debugf0("860 pci_get_device fail\n");
@@ -305,10 +303,10 @@ static int __init i82860_init(void)
305 303
306 return 0; 304 return 0;
307 305
308fail1: 306 fail1:
309 pci_unregister_driver(&i82860_driver); 307 pci_unregister_driver(&i82860_driver);
310 308
311fail0: 309 fail0:
312 if (mci_pdev != NULL) 310 if (mci_pdev != NULL)
313 pci_dev_put(mci_pdev); 311 pci_dev_put(mci_pdev);
314 312
@@ -330,5 +328,5 @@ module_exit(i82860_exit);
330 328
331MODULE_LICENSE("GPL"); 329MODULE_LICENSE("GPL");
332MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com) " 330MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com) "
333 "Ben Woodard <woodard@redhat.com>"); 331 "Ben Woodard <woodard@redhat.com>");
334MODULE_DESCRIPTION("ECC support for Intel 82860 memory hub controllers"); 332MODULE_DESCRIPTION("ECC support for Intel 82860 memory hub controllers");