diff options
author | Joe Perches <joe@perches.com> | 2012-04-29 16:08:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-11 12:23:49 -0400 |
commit | 956b9ba156dbfdb9cede2b2927ddf8be2233b3a7 (patch) | |
tree | 6ece471eee029a1ca83ce649f7dc23020ebef182 /drivers/edac/e752x_edac.c | |
parent | 7e881856eee8b889b76cd1d8e04ce2fc79b72099 (diff) |
edac: Convert debugfX to edac_dbg(X,
Use a more common debugging style.
Remove __FILE__ uses, add missing newlines,
coalesce formats and align arguments.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/e752x_edac.c')
-rw-r--r-- | drivers/edac/e752x_edac.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index 39c8997b2162..675ba3c284eb 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c | |||
@@ -309,7 +309,7 @@ static unsigned long ctl_page_to_phys(struct mem_ctl_info *mci, | |||
309 | u32 remap; | 309 | u32 remap; |
310 | struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; | 310 | struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; |
311 | 311 | ||
312 | debugf3("\n"); | 312 | edac_dbg(3, "\n"); |
313 | 313 | ||
314 | if (page < pvt->tolm) | 314 | if (page < pvt->tolm) |
315 | return page; | 315 | return page; |
@@ -335,7 +335,7 @@ static void do_process_ce(struct mem_ctl_info *mci, u16 error_one, | |||
335 | int i; | 335 | int i; |
336 | struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; | 336 | struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; |
337 | 337 | ||
338 | debugf3("\n"); | 338 | edac_dbg(3, "\n"); |
339 | 339 | ||
340 | /* convert the addr to 4k page */ | 340 | /* convert the addr to 4k page */ |
341 | page = sec1_add >> (PAGE_SHIFT - 4); | 341 | page = sec1_add >> (PAGE_SHIFT - 4); |
@@ -394,7 +394,7 @@ static void do_process_ue(struct mem_ctl_info *mci, u16 error_one, | |||
394 | int row; | 394 | int row; |
395 | struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; | 395 | struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; |
396 | 396 | ||
397 | debugf3("\n"); | 397 | edac_dbg(3, "\n"); |
398 | 398 | ||
399 | if (error_one & 0x0202) { | 399 | if (error_one & 0x0202) { |
400 | error_2b = ded_add; | 400 | error_2b = ded_add; |
@@ -453,7 +453,7 @@ static inline void process_ue_no_info_wr(struct mem_ctl_info *mci, | |||
453 | if (!handle_error) | 453 | if (!handle_error) |
454 | return; | 454 | return; |
455 | 455 | ||
456 | debugf3("\n"); | 456 | edac_dbg(3, "\n"); |
457 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, | 457 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, |
458 | -1, -1, -1, | 458 | -1, -1, -1, |
459 | "e752x UE log memory write", "", NULL); | 459 | "e752x UE log memory write", "", NULL); |
@@ -982,7 +982,7 @@ static void e752x_check(struct mem_ctl_info *mci) | |||
982 | { | 982 | { |
983 | struct e752x_error_info info; | 983 | struct e752x_error_info info; |
984 | 984 | ||
985 | debugf3("\n"); | 985 | edac_dbg(3, "\n"); |
986 | e752x_get_error_info(mci, &info); | 986 | e752x_get_error_info(mci, &info); |
987 | e752x_process_error_info(mci, &info, 1); | 987 | e752x_process_error_info(mci, &info, 1); |
988 | } | 988 | } |
@@ -1102,8 +1102,7 @@ static void e752x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | |||
1102 | pci_read_config_byte(pdev, E752X_DRB + index, &value); | 1102 | pci_read_config_byte(pdev, E752X_DRB + index, &value); |
1103 | /* convert a 128 or 64 MiB DRB to a page size. */ | 1103 | /* convert a 128 or 64 MiB DRB to a page size. */ |
1104 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); | 1104 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); |
1105 | debugf3("(%d) cumul_size 0x%x\n", index, | 1105 | edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); |
1106 | cumul_size); | ||
1107 | if (cumul_size == last_cumul_size) | 1106 | if (cumul_size == last_cumul_size) |
1108 | continue; /* not populated */ | 1107 | continue; /* not populated */ |
1109 | 1108 | ||
@@ -1129,7 +1128,7 @@ static void e752x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | |||
1129 | for (i = 0; i < csrow->nr_channels; i++) { | 1128 | for (i = 0; i < csrow->nr_channels; i++) { |
1130 | struct dimm_info *dimm = csrow->channels[i]->dimm; | 1129 | struct dimm_info *dimm = csrow->channels[i]->dimm; |
1131 | 1130 | ||
1132 | debugf3("Initializing rank at (%i,%i)\n", index, i); | 1131 | edac_dbg(3, "Initializing rank at (%i,%i)\n", index, i); |
1133 | dimm->nr_pages = nr_pages / csrow->nr_channels; | 1132 | dimm->nr_pages = nr_pages / csrow->nr_channels; |
1134 | dimm->grain = 1 << 12; /* 4KiB - resolution of CELOG */ | 1133 | dimm->grain = 1 << 12; /* 4KiB - resolution of CELOG */ |
1135 | dimm->mtype = MEM_RDDR; /* only one type supported */ | 1134 | dimm->mtype = MEM_RDDR; /* only one type supported */ |
@@ -1270,8 +1269,8 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1270 | int drc_chan; /* Number of channels 0=1chan,1=2chan */ | 1269 | int drc_chan; /* Number of channels 0=1chan,1=2chan */ |
1271 | struct e752x_error_info discard; | 1270 | struct e752x_error_info discard; |
1272 | 1271 | ||
1273 | debugf0("mci\n"); | 1272 | edac_dbg(0, "mci\n"); |
1274 | debugf0("Starting Probe1\n"); | 1273 | edac_dbg(0, "Starting Probe1\n"); |
1275 | 1274 | ||
1276 | /* check to see if device 0 function 1 is enabled; if it isn't, we | 1275 | /* check to see if device 0 function 1 is enabled; if it isn't, we |
1277 | * assume the BIOS has reserved it for a reason and is expecting | 1276 | * assume the BIOS has reserved it for a reason and is expecting |
@@ -1301,7 +1300,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1301 | if (mci == NULL) | 1300 | if (mci == NULL) |
1302 | return -ENOMEM; | 1301 | return -ENOMEM; |
1303 | 1302 | ||
1304 | debugf3("init mci\n"); | 1303 | edac_dbg(3, "init mci\n"); |
1305 | mci->mtype_cap = MEM_FLAG_RDDR; | 1304 | mci->mtype_cap = MEM_FLAG_RDDR; |
1306 | /* 3100 IMCH supports SECDEC only */ | 1305 | /* 3100 IMCH supports SECDEC only */ |
1307 | mci->edac_ctl_cap = (dev_idx == I3100) ? EDAC_FLAG_SECDED : | 1306 | mci->edac_ctl_cap = (dev_idx == I3100) ? EDAC_FLAG_SECDED : |
@@ -1311,7 +1310,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1311 | mci->mod_ver = E752X_REVISION; | 1310 | mci->mod_ver = E752X_REVISION; |
1312 | mci->pdev = &pdev->dev; | 1311 | mci->pdev = &pdev->dev; |
1313 | 1312 | ||
1314 | debugf3("init pvt\n"); | 1313 | edac_dbg(3, "init pvt\n"); |
1315 | pvt = (struct e752x_pvt *)mci->pvt_info; | 1314 | pvt = (struct e752x_pvt *)mci->pvt_info; |
1316 | pvt->dev_info = &e752x_devs[dev_idx]; | 1315 | pvt->dev_info = &e752x_devs[dev_idx]; |
1317 | pvt->mc_symmetric = ((ddrcsr & 0x10) != 0); | 1316 | pvt->mc_symmetric = ((ddrcsr & 0x10) != 0); |
@@ -1321,7 +1320,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1321 | return -ENODEV; | 1320 | return -ENODEV; |
1322 | } | 1321 | } |
1323 | 1322 | ||
1324 | debugf3("more mci init\n"); | 1323 | edac_dbg(3, "more mci init\n"); |
1325 | mci->ctl_name = pvt->dev_info->ctl_name; | 1324 | mci->ctl_name = pvt->dev_info->ctl_name; |
1326 | mci->dev_name = pci_name(pdev); | 1325 | mci->dev_name = pci_name(pdev); |
1327 | mci->edac_check = e752x_check; | 1326 | mci->edac_check = e752x_check; |
@@ -1343,7 +1342,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1343 | mci->edac_cap = EDAC_FLAG_SECDED; /* the only mode supported */ | 1342 | mci->edac_cap = EDAC_FLAG_SECDED; /* the only mode supported */ |
1344 | else | 1343 | else |
1345 | mci->edac_cap |= EDAC_FLAG_NONE; | 1344 | mci->edac_cap |= EDAC_FLAG_NONE; |
1346 | debugf3("tolm, remapbase, remaplimit\n"); | 1345 | edac_dbg(3, "tolm, remapbase, remaplimit\n"); |
1347 | 1346 | ||
1348 | /* load the top of low memory, remap base, and remap limit vars */ | 1347 | /* load the top of low memory, remap base, and remap limit vars */ |
1349 | pci_read_config_word(pdev, E752X_TOLM, &pci_data); | 1348 | pci_read_config_word(pdev, E752X_TOLM, &pci_data); |
@@ -1360,7 +1359,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1360 | * type of memory controller. The ID is therefore hardcoded to 0. | 1359 | * type of memory controller. The ID is therefore hardcoded to 0. |
1361 | */ | 1360 | */ |
1362 | if (edac_mc_add_mc(mci)) { | 1361 | if (edac_mc_add_mc(mci)) { |
1363 | debugf3("failed edac_mc_add_mc()\n"); | 1362 | edac_dbg(3, "failed edac_mc_add_mc()\n"); |
1364 | goto fail; | 1363 | goto fail; |
1365 | } | 1364 | } |
1366 | 1365 | ||
@@ -1378,7 +1377,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1378 | } | 1377 | } |
1379 | 1378 | ||
1380 | /* get this far and it's successful */ | 1379 | /* get this far and it's successful */ |
1381 | debugf3("success\n"); | 1380 | edac_dbg(3, "success\n"); |
1382 | return 0; | 1381 | return 0; |
1383 | 1382 | ||
1384 | fail: | 1383 | fail: |
@@ -1394,7 +1393,7 @@ fail: | |||
1394 | static int __devinit e752x_init_one(struct pci_dev *pdev, | 1393 | static int __devinit e752x_init_one(struct pci_dev *pdev, |
1395 | const struct pci_device_id *ent) | 1394 | const struct pci_device_id *ent) |
1396 | { | 1395 | { |
1397 | debugf0("\n"); | 1396 | edac_dbg(0, "\n"); |
1398 | 1397 | ||
1399 | /* wake up and enable device */ | 1398 | /* wake up and enable device */ |
1400 | if (pci_enable_device(pdev) < 0) | 1399 | if (pci_enable_device(pdev) < 0) |
@@ -1408,7 +1407,7 @@ static void __devexit e752x_remove_one(struct pci_dev *pdev) | |||
1408 | struct mem_ctl_info *mci; | 1407 | struct mem_ctl_info *mci; |
1409 | struct e752x_pvt *pvt; | 1408 | struct e752x_pvt *pvt; |
1410 | 1409 | ||
1411 | debugf0("\n"); | 1410 | edac_dbg(0, "\n"); |
1412 | 1411 | ||
1413 | if (e752x_pci) | 1412 | if (e752x_pci) |
1414 | edac_pci_release_generic_ctl(e752x_pci); | 1413 | edac_pci_release_generic_ctl(e752x_pci); |
@@ -1454,7 +1453,7 @@ static int __init e752x_init(void) | |||
1454 | { | 1453 | { |
1455 | int pci_rc; | 1454 | int pci_rc; |
1456 | 1455 | ||
1457 | debugf3("\n"); | 1456 | edac_dbg(3, "\n"); |
1458 | 1457 | ||
1459 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | 1458 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ |
1460 | opstate_init(); | 1459 | opstate_init(); |
@@ -1465,7 +1464,7 @@ static int __init e752x_init(void) | |||
1465 | 1464 | ||
1466 | static void __exit e752x_exit(void) | 1465 | static void __exit e752x_exit(void) |
1467 | { | 1466 | { |
1468 | debugf3("\n"); | 1467 | edac_dbg(3, "\n"); |
1469 | pci_unregister_driver(&e752x_driver); | 1468 | pci_unregister_driver(&e752x_driver); |
1470 | } | 1469 | } |
1471 | 1470 | ||