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/i82975x_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/i82975x_edac.c')
-rw-r--r-- | drivers/edac/i82975x_edac.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c index 91b9e33fff27..974d1a2be379 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\n", mci->mc_idx); | 334 | edac_dbg(1, "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,8 +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("(%d) cumul_size 0x%x\n", index, | 409 | edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); |
410 | cumul_size); | ||
411 | 410 | ||
412 | nr_pages = cumul_size - last_cumul_size; | 411 | nr_pages = cumul_size - last_cumul_size; |
413 | if (!nr_pages) | 412 | if (!nr_pages) |
@@ -489,11 +488,11 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx) | |||
489 | u8 c1drb[4]; | 488 | u8 c1drb[4]; |
490 | #endif | 489 | #endif |
491 | 490 | ||
492 | debugf0("\n"); | 491 | edac_dbg(0, "\n"); |
493 | 492 | ||
494 | pci_read_config_dword(pdev, I82975X_MCHBAR, &mchbar); | 493 | pci_read_config_dword(pdev, I82975X_MCHBAR, &mchbar); |
495 | if (!(mchbar & 1)) { | 494 | if (!(mchbar & 1)) { |
496 | debugf3("failed, MCHBAR disabled!\n"); | 495 | edac_dbg(3, "failed, MCHBAR disabled!\n"); |
497 | goto fail0; | 496 | goto fail0; |
498 | } | 497 | } |
499 | mchbar &= 0xffffc000; /* bits 31:14 used for 16K window */ | 498 | mchbar &= 0xffffc000; /* bits 31:14 used for 16K window */ |
@@ -558,7 +557,7 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx) | |||
558 | goto fail1; | 557 | goto fail1; |
559 | } | 558 | } |
560 | 559 | ||
561 | debugf3("init mci\n"); | 560 | edac_dbg(3, "init mci\n"); |
562 | mci->pdev = &pdev->dev; | 561 | mci->pdev = &pdev->dev; |
563 | mci->mtype_cap = MEM_FLAG_DDR2; | 562 | mci->mtype_cap = MEM_FLAG_DDR2; |
564 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; | 563 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; |
@@ -569,7 +568,7 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx) | |||
569 | mci->dev_name = pci_name(pdev); | 568 | mci->dev_name = pci_name(pdev); |
570 | mci->edac_check = i82975x_check; | 569 | mci->edac_check = i82975x_check; |
571 | mci->ctl_page_to_phys = NULL; | 570 | mci->ctl_page_to_phys = NULL; |
572 | debugf3("init pvt\n"); | 571 | edac_dbg(3, "init pvt\n"); |
573 | pvt = (struct i82975x_pvt *) mci->pvt_info; | 572 | pvt = (struct i82975x_pvt *) mci->pvt_info; |
574 | pvt->mch_window = mch_window; | 573 | pvt->mch_window = mch_window; |
575 | i82975x_init_csrows(mci, pdev, mch_window); | 574 | i82975x_init_csrows(mci, pdev, mch_window); |
@@ -578,12 +577,12 @@ static int i82975x_probe1(struct pci_dev *pdev, int dev_idx) | |||
578 | 577 | ||
579 | /* finalize this instance of memory controller with edac core */ | 578 | /* finalize this instance of memory controller with edac core */ |
580 | if (edac_mc_add_mc(mci)) { | 579 | if (edac_mc_add_mc(mci)) { |
581 | debugf3("failed edac_mc_add_mc()\n"); | 580 | edac_dbg(3, "failed edac_mc_add_mc()\n"); |
582 | goto fail2; | 581 | goto fail2; |
583 | } | 582 | } |
584 | 583 | ||
585 | /* get this far and it's successful */ | 584 | /* get this far and it's successful */ |
586 | debugf3("success\n"); | 585 | edac_dbg(3, "success\n"); |
587 | return 0; | 586 | return 0; |
588 | 587 | ||
589 | fail2: | 588 | fail2: |
@@ -601,7 +600,7 @@ static int __devinit i82975x_init_one(struct pci_dev *pdev, | |||
601 | { | 600 | { |
602 | int rc; | 601 | int rc; |
603 | 602 | ||
604 | debugf0("\n"); | 603 | edac_dbg(0, "\n"); |
605 | 604 | ||
606 | if (pci_enable_device(pdev) < 0) | 605 | if (pci_enable_device(pdev) < 0) |
607 | return -EIO; | 606 | return -EIO; |
@@ -619,7 +618,7 @@ static void __devexit i82975x_remove_one(struct pci_dev *pdev) | |||
619 | struct mem_ctl_info *mci; | 618 | struct mem_ctl_info *mci; |
620 | struct i82975x_pvt *pvt; | 619 | struct i82975x_pvt *pvt; |
621 | 620 | ||
622 | debugf0("\n"); | 621 | edac_dbg(0, "\n"); |
623 | 622 | ||
624 | mci = edac_mc_del_mc(&pdev->dev); | 623 | mci = edac_mc_del_mc(&pdev->dev); |
625 | if (mci == NULL) | 624 | if (mci == NULL) |
@@ -655,7 +654,7 @@ static int __init i82975x_init(void) | |||
655 | { | 654 | { |
656 | int pci_rc; | 655 | int pci_rc; |
657 | 656 | ||
658 | debugf3("\n"); | 657 | edac_dbg(3, "\n"); |
659 | 658 | ||
660 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | 659 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ |
661 | opstate_init(); | 660 | opstate_init(); |
@@ -669,7 +668,7 @@ static int __init i82975x_init(void) | |||
669 | PCI_DEVICE_ID_INTEL_82975_0, NULL); | 668 | PCI_DEVICE_ID_INTEL_82975_0, NULL); |
670 | 669 | ||
671 | if (!mci_pdev) { | 670 | if (!mci_pdev) { |
672 | debugf0("i82975x pci_get_device fail\n"); | 671 | edac_dbg(0, "i82975x pci_get_device fail\n"); |
673 | pci_rc = -ENODEV; | 672 | pci_rc = -ENODEV; |
674 | goto fail1; | 673 | goto fail1; |
675 | } | 674 | } |
@@ -677,7 +676,7 @@ static int __init i82975x_init(void) | |||
677 | pci_rc = i82975x_init_one(mci_pdev, i82975x_pci_tbl); | 676 | pci_rc = i82975x_init_one(mci_pdev, i82975x_pci_tbl); |
678 | 677 | ||
679 | if (pci_rc < 0) { | 678 | if (pci_rc < 0) { |
680 | debugf0("i82975x init fail\n"); | 679 | edac_dbg(0, "i82975x init fail\n"); |
681 | pci_rc = -ENODEV; | 680 | pci_rc = -ENODEV; |
682 | goto fail1; | 681 | goto fail1; |
683 | } | 682 | } |
@@ -697,7 +696,7 @@ fail0: | |||
697 | 696 | ||
698 | static void __exit i82975x_exit(void) | 697 | static void __exit i82975x_exit(void) |
699 | { | 698 | { |
700 | debugf3("\n"); | 699 | edac_dbg(3, "\n"); |
701 | 700 | ||
702 | pci_unregister_driver(&i82975x_driver); | 701 | pci_unregister_driver(&i82975x_driver); |
703 | 702 | ||