aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/e7xxx_edac.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-04-29 10:59:14 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-11 12:23:47 -0400
commitdd23cd6eb1f59ba722a6e6aa228adff7c01404de (patch)
tree32c45fb296293af1309f926b8c109eef329f4f22 /drivers/edac/e7xxx_edac.c
parent2639c3ee298401881cc560c5e3987f8b222b9f7c (diff)
edac: Don't add __func__ or __FILE__ for debugf[0-9] msgs
The debug macro already adds that. Most of the work here was made by this small script: $f .=$_ while (<>); $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*": /\1"/g; $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*/\1/g; $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*"MC: /\1"/g; $f =~ s/(debugf[0-9]\s*\(\")\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+)__func__\s*\,\s*/\1\2/g; $f =~ s/(debugf[0-9]\s*\(\")\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+),\s*__func__\s*\)/\1\2)/g; $f =~ s/(debugf[0-9]\s*\(\"MC\:\s*)\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+)__func__\s*\,\s*/\1\2/g; $f =~ s/(debugf[0-9]\s*\(\"MC\:\s*)\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+),\s*__func__\s*\)/\1\2)/g; $f =~ s/\"MC\: \\n\"/"MC:\\n"/g; print $f; After running the script, manual cleanups were done to fix it the remaining places. While here, removed the __LINE__ on most places, as it doesn't actually give useful info on most places. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/e7xxx_edac.c')
-rw-r--r--drivers/edac/e7xxx_edac.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index c6c0ebaca371..691d7067a141 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -166,7 +166,7 @@ static const struct e7xxx_dev_info e7xxx_devs[] = {
166/* FIXME - is this valid for both SECDED and S4ECD4ED? */ 166/* FIXME - is this valid for both SECDED and S4ECD4ED? */
167static inline int e7xxx_find_channel(u16 syndrome) 167static inline int e7xxx_find_channel(u16 syndrome)
168{ 168{
169 debugf3("%s()\n", __func__); 169 debugf3("\n");
170 170
171 if ((syndrome & 0xff00) == 0) 171 if ((syndrome & 0xff00) == 0)
172 return 0; 172 return 0;
@@ -186,7 +186,7 @@ static unsigned long ctl_page_to_phys(struct mem_ctl_info *mci,
186 u32 remap; 186 u32 remap;
187 struct e7xxx_pvt *pvt = (struct e7xxx_pvt *)mci->pvt_info; 187 struct e7xxx_pvt *pvt = (struct e7xxx_pvt *)mci->pvt_info;
188 188
189 debugf3("%s()\n", __func__); 189 debugf3("\n");
190 190
191 if ((page < pvt->tolm) || 191 if ((page < pvt->tolm) ||
192 ((page >= 0x100000) && (page < pvt->remapbase))) 192 ((page >= 0x100000) && (page < pvt->remapbase)))
@@ -208,7 +208,7 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
208 int row; 208 int row;
209 int channel; 209 int channel;
210 210
211 debugf3("%s()\n", __func__); 211 debugf3("\n");
212 /* read the error address */ 212 /* read the error address */
213 error_1b = info->dram_celog_add; 213 error_1b = info->dram_celog_add;
214 /* FIXME - should use PAGE_SHIFT */ 214 /* FIXME - should use PAGE_SHIFT */
@@ -225,7 +225,7 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
225 225
226static void process_ce_no_info(struct mem_ctl_info *mci) 226static void process_ce_no_info(struct mem_ctl_info *mci)
227{ 227{
228 debugf3("%s()\n", __func__); 228 debugf3("\n");
229 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, 229 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1,
230 "e7xxx CE log register overflow", "", NULL); 230 "e7xxx CE log register overflow", "", NULL);
231} 231}
@@ -235,7 +235,7 @@ static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
235 u32 error_2b, block_page; 235 u32 error_2b, block_page;
236 int row; 236 int row;
237 237
238 debugf3("%s()\n", __func__); 238 debugf3("\n");
239 /* read the error address */ 239 /* read the error address */
240 error_2b = info->dram_uelog_add; 240 error_2b = info->dram_uelog_add;
241 /* FIXME - should use PAGE_SHIFT */ 241 /* FIXME - should use PAGE_SHIFT */
@@ -248,7 +248,7 @@ static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info)
248 248
249static void process_ue_no_info(struct mem_ctl_info *mci) 249static void process_ue_no_info(struct mem_ctl_info *mci)
250{ 250{
251 debugf3("%s()\n", __func__); 251 debugf3("\n");
252 252
253 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, 253 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1,
254 "e7xxx UE log register overflow", "", NULL); 254 "e7xxx UE log register overflow", "", NULL);
@@ -334,7 +334,7 @@ static void e7xxx_check(struct mem_ctl_info *mci)
334{ 334{
335 struct e7xxx_error_info info; 335 struct e7xxx_error_info info;
336 336
337 debugf3("%s()\n", __func__); 337 debugf3("\n");
338 e7xxx_get_error_info(mci, &info); 338 e7xxx_get_error_info(mci, &info);
339 e7xxx_process_error_info(mci, &info, 1); 339 e7xxx_process_error_info(mci, &info, 1);
340} 340}
@@ -383,7 +383,7 @@ static void e7xxx_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev,
383 pci_read_config_byte(pdev, E7XXX_DRB + index, &value); 383 pci_read_config_byte(pdev, E7XXX_DRB + index, &value);
384 /* convert a 64 or 32 MiB DRB to a page size. */ 384 /* convert a 64 or 32 MiB DRB to a page size. */
385 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); 385 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT);
386 debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, 386 debugf3("(%d) cumul_size 0x%x\n", index,
387 cumul_size); 387 cumul_size);
388 if (cumul_size == last_cumul_size) 388 if (cumul_size == last_cumul_size)
389 continue; /* not populated */ 389 continue; /* not populated */
@@ -430,7 +430,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
430 int drc_chan; 430 int drc_chan;
431 struct e7xxx_error_info discard; 431 struct e7xxx_error_info discard;
432 432
433 debugf0("%s(): mci\n", __func__); 433 debugf0("mci\n");
434 434
435 pci_read_config_dword(pdev, E7XXX_DRC, &drc); 435 pci_read_config_dword(pdev, E7XXX_DRC, &drc);
436 436
@@ -453,7 +453,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
453 if (mci == NULL) 453 if (mci == NULL)
454 return -ENOMEM; 454 return -ENOMEM;
455 455
456 debugf3("%s(): init mci\n", __func__); 456 debugf3("init mci\n");
457 mci->mtype_cap = MEM_FLAG_RDDR; 457 mci->mtype_cap = MEM_FLAG_RDDR;
458 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | 458 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED |
459 EDAC_FLAG_S4ECD4ED; 459 EDAC_FLAG_S4ECD4ED;
@@ -461,7 +461,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
461 mci->mod_name = EDAC_MOD_STR; 461 mci->mod_name = EDAC_MOD_STR;
462 mci->mod_ver = E7XXX_REVISION; 462 mci->mod_ver = E7XXX_REVISION;
463 mci->pdev = &pdev->dev; 463 mci->pdev = &pdev->dev;
464 debugf3("%s(): init pvt\n", __func__); 464 debugf3("init pvt\n");
465 pvt = (struct e7xxx_pvt *)mci->pvt_info; 465 pvt = (struct e7xxx_pvt *)mci->pvt_info;
466 pvt->dev_info = &e7xxx_devs[dev_idx]; 466 pvt->dev_info = &e7xxx_devs[dev_idx];
467 pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, 467 pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
@@ -474,14 +474,14 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
474 goto fail0; 474 goto fail0;
475 } 475 }
476 476
477 debugf3("%s(): more mci init\n", __func__); 477 debugf3("more mci init\n");
478 mci->ctl_name = pvt->dev_info->ctl_name; 478 mci->ctl_name = pvt->dev_info->ctl_name;
479 mci->dev_name = pci_name(pdev); 479 mci->dev_name = pci_name(pdev);
480 mci->edac_check = e7xxx_check; 480 mci->edac_check = e7xxx_check;
481 mci->ctl_page_to_phys = ctl_page_to_phys; 481 mci->ctl_page_to_phys = ctl_page_to_phys;
482 e7xxx_init_csrows(mci, pdev, dev_idx, drc); 482 e7xxx_init_csrows(mci, pdev, dev_idx, drc);
483 mci->edac_cap |= EDAC_FLAG_NONE; 483 mci->edac_cap |= EDAC_FLAG_NONE;
484 debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); 484 debugf3("tolm, remapbase, remaplimit\n");
485 /* load the top of low memory, remap base, and remap limit vars */ 485 /* load the top of low memory, remap base, and remap limit vars */
486 pci_read_config_word(pdev, E7XXX_TOLM, &pci_data); 486 pci_read_config_word(pdev, E7XXX_TOLM, &pci_data);
487 pvt->tolm = ((u32) pci_data) << 4; 487 pvt->tolm = ((u32) pci_data) << 4;
@@ -500,7 +500,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
500 * type of memory controller. The ID is therefore hardcoded to 0. 500 * type of memory controller. The ID is therefore hardcoded to 0.
501 */ 501 */
502 if (edac_mc_add_mc(mci)) { 502 if (edac_mc_add_mc(mci)) {
503 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 503 debugf3("failed edac_mc_add_mc()\n");
504 goto fail1; 504 goto fail1;
505 } 505 }
506 506
@@ -516,7 +516,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
516 } 516 }
517 517
518 /* get this far and it's successful */ 518 /* get this far and it's successful */
519 debugf3("%s(): success\n", __func__); 519 debugf3("success\n");
520 return 0; 520 return 0;
521 521
522fail1: 522fail1:
@@ -532,7 +532,7 @@ fail0:
532static int __devinit e7xxx_init_one(struct pci_dev *pdev, 532static int __devinit e7xxx_init_one(struct pci_dev *pdev,
533 const struct pci_device_id *ent) 533 const struct pci_device_id *ent)
534{ 534{
535 debugf0("%s()\n", __func__); 535 debugf0("\n");
536 536
537 /* wake up and enable device */ 537 /* wake up and enable device */
538 return pci_enable_device(pdev) ? 538 return pci_enable_device(pdev) ?
@@ -544,7 +544,7 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
544 struct mem_ctl_info *mci; 544 struct mem_ctl_info *mci;
545 struct e7xxx_pvt *pvt; 545 struct e7xxx_pvt *pvt;
546 546
547 debugf0("%s()\n", __func__); 547 debugf0("\n");
548 548
549 if (e7xxx_pci) 549 if (e7xxx_pci)
550 edac_pci_release_generic_ctl(e7xxx_pci); 550 edac_pci_release_generic_ctl(e7xxx_pci);