aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i82975x_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/i82975x_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/i82975x_edac.c')
-rw-r--r--drivers/edac/i82975x_edac.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
index 4d239ab31e34..91b9e33fff27 100644
--- a/drivers/edac/i82975x_edac.c
+++ b/drivers/edac/i82975x_edac.c
@@ -331,7 +331,7 @@ static void i82975x_check(struct mem_ctl_info *mci)
331{ 331{
332 struct i82975x_error_info info; 332 struct i82975x_error_info info;
333 333
334 debugf1("MC%d: %s()\n", mci->mc_idx, __func__); 334 debugf1("MC%d\n", mci->mc_idx);
335 i82975x_get_error_info(mci, &info); 335 i82975x_get_error_info(mci, &info);
336 i82975x_process_error_info(mci, &info, 1); 336 i82975x_process_error_info(mci, &info, 1);
337} 337}
@@ -406,7 +406,7 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
406 */ 406 */
407 if (csrow->nr_channels > 1) 407 if (csrow->nr_channels > 1)
408 cumul_size <<= 1; 408 cumul_size <<= 1;
409 debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, 409 debugf3("(%d) cumul_size 0x%x\n", index,
410 cumul_size); 410 cumul_size);
411 411
412 nr_pages = cumul_size - last_cumul_size; 412 nr_pages = cumul_size - last_cumul_size;
@@ -489,11 +489,11 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
489 u8 c1drb[4]; 489 u8 c1drb[4];
490#endif 490#endif
491 491
492 debugf0("%s()\n", __func__); 492 debugf0("\n");
493 493
494 pci_read_config_dword(pdev, I82975X_MCHBAR, &mchbar); 494 pci_read_config_dword(pdev, I82975X_MCHBAR, &mchbar);
495 if (!(mchbar & 1)) { 495 if (!(mchbar & 1)) {
496 debugf3("%s(): failed, MCHBAR disabled!\n", __func__); 496 debugf3("failed, MCHBAR disabled!\n");
497 goto fail0; 497 goto fail0;
498 } 498 }
499 mchbar &= 0xffffc000; /* bits 31:14 used for 16K window */ 499 mchbar &= 0xffffc000; /* bits 31:14 used for 16K window */
@@ -558,7 +558,7 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
558 goto fail1; 558 goto fail1;
559 } 559 }
560 560
561 debugf3("%s(): init mci\n", __func__); 561 debugf3("init mci\n");
562 mci->pdev = &pdev->dev; 562 mci->pdev = &pdev->dev;
563 mci->mtype_cap = MEM_FLAG_DDR2; 563 mci->mtype_cap = MEM_FLAG_DDR2;
564 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; 564 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
@@ -569,7 +569,7 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
569 mci->dev_name = pci_name(pdev); 569 mci->dev_name = pci_name(pdev);
570 mci->edac_check = i82975x_check; 570 mci->edac_check = i82975x_check;
571 mci->ctl_page_to_phys = NULL; 571 mci->ctl_page_to_phys = NULL;
572 debugf3("%s(): init pvt\n", __func__); 572 debugf3("init pvt\n");
573 pvt = (struct i82975x_pvt *) mci->pvt_info; 573 pvt = (struct i82975x_pvt *) mci->pvt_info;
574 pvt->mch_window = mch_window; 574 pvt->mch_window = mch_window;
575 i82975x_init_csrows(mci, pdev, mch_window); 575 i82975x_init_csrows(mci, pdev, mch_window);
@@ -578,12 +578,12 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx)
578 578
579 /* finalize this instance of memory controller with edac core */ 579 /* finalize this instance of memory controller with edac core */
580 if (edac_mc_add_mc(mci)) { 580 if (edac_mc_add_mc(mci)) {
581 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 581 debugf3("failed edac_mc_add_mc()\n");
582 goto fail2; 582 goto fail2;
583 } 583 }
584 584
585 /* get this far and it's successful */ 585 /* get this far and it's successful */
586 debugf3("%s(): success\n", __func__); 586 debugf3("success\n");
587 return 0; 587 return 0;
588 588
589fail2: 589fail2:
@@ -601,7 +601,7 @@ static int __devinit i82975x_init_one(struct pci_dev *pdev,
601{ 601{
602 int rc; 602 int rc;
603 603
604 debugf0("%s()\n", __func__); 604 debugf0("\n");
605 605
606 if (pci_enable_device(pdev) < 0) 606 if (pci_enable_device(pdev) < 0)
607 return -EIO; 607 return -EIO;
@@ -619,7 +619,7 @@ static void __devexit i82975x_remove_one(struct pci_dev *pdev)
619 struct mem_ctl_info *mci; 619 struct mem_ctl_info *mci;
620 struct i82975x_pvt *pvt; 620 struct i82975x_pvt *pvt;
621 621
622 debugf0("%s()\n", __func__); 622 debugf0("\n");
623 623
624 mci = edac_mc_del_mc(&pdev->dev); 624 mci = edac_mc_del_mc(&pdev->dev);
625 if (mci == NULL) 625 if (mci == NULL)
@@ -655,7 +655,7 @@ static int __init i82975x_init(void)
655{ 655{
656 int pci_rc; 656 int pci_rc;
657 657
658 debugf3("%s()\n", __func__); 658 debugf3("\n");
659 659
660 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 660 /* Ensure that the OPSTATE is set correctly for POLL or NMI */
661 opstate_init(); 661 opstate_init();
@@ -697,7 +697,7 @@ fail0:
697 697
698static void __exit i82975x_exit(void) 698static void __exit i82975x_exit(void)
699{ 699{
700 debugf3("%s()\n", __func__); 700 debugf3("\n");
701 701
702 pci_unregister_driver(&i82975x_driver); 702 pci_unregister_driver(&i82975x_driver);
703 703