diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-29 10:59:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-11 12:23:47 -0400 |
commit | dd23cd6eb1f59ba722a6e6aa228adff7c01404de (patch) | |
tree | 32c45fb296293af1309f926b8c109eef329f4f22 /drivers/edac/i5000_edac.c | |
parent | 2639c3ee298401881cc560c5e3987f8b222b9f7c (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/i5000_edac.c')
-rw-r--r-- | drivers/edac/i5000_edac.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index a7da4c7ad7fa..4a5ca5229d5f 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
@@ -779,7 +779,7 @@ static void i5000_clear_error(struct mem_ctl_info *mci) | |||
779 | static void i5000_check_error(struct mem_ctl_info *mci) | 779 | static void i5000_check_error(struct mem_ctl_info *mci) |
780 | { | 780 | { |
781 | struct i5000_error_info info; | 781 | struct i5000_error_info info; |
782 | debugf4("MC%d: %s: %s()\n", mci->mc_idx, __FILE__, __func__); | 782 | debugf4("MC%d\n", mci->mc_idx); |
783 | i5000_get_error_info(mci, &info); | 783 | i5000_get_error_info(mci, &info); |
784 | i5000_process_error_info(mci, &info, 1); | 784 | i5000_process_error_info(mci, &info, 1); |
785 | } | 785 | } |
@@ -1363,9 +1363,8 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
1363 | int num_channels; | 1363 | int num_channels; |
1364 | int num_dimms_per_channel; | 1364 | int num_dimms_per_channel; |
1365 | 1365 | ||
1366 | debugf0("MC: %s: %s(), pdev bus %u dev=0x%x fn=0x%x\n", | 1366 | debugf0("MC: %s(), pdev bus %u dev=0x%x fn=0x%x\n", |
1367 | __FILE__, __func__, | 1367 | __FILE__, pdev->bus->number, |
1368 | pdev->bus->number, | ||
1369 | PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); | 1368 | PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); |
1370 | 1369 | ||
1371 | /* We only are looking for func 0 of the set */ | 1370 | /* We only are looking for func 0 of the set */ |
@@ -1388,8 +1387,8 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
1388 | i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, | 1387 | i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, |
1389 | &num_channels); | 1388 | &num_channels); |
1390 | 1389 | ||
1391 | debugf0("MC: %s(): Number of Branches=2 Channels= %d DIMMS= %d\n", | 1390 | debugf0("MC: Number of Branches=2 Channels= %d DIMMS= %d\n", |
1392 | __func__, num_channels, num_dimms_per_channel); | 1391 | num_channels, num_dimms_per_channel); |
1393 | 1392 | ||
1394 | /* allocate a new MC control structure */ | 1393 | /* allocate a new MC control structure */ |
1395 | 1394 | ||
@@ -1406,7 +1405,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
1406 | if (mci == NULL) | 1405 | if (mci == NULL) |
1407 | return -ENOMEM; | 1406 | return -ENOMEM; |
1408 | 1407 | ||
1409 | debugf0("MC: %s: %s(): mci = %p\n", __FILE__, __func__, mci); | 1408 | debugf0("MC: %s(): mci = %p\n", __FILE__, mci); |
1410 | 1409 | ||
1411 | mci->pdev = &pdev->dev; /* record ptr to the generic device */ | 1410 | mci->pdev = &pdev->dev; /* record ptr to the generic device */ |
1412 | 1411 | ||
@@ -1449,8 +1448,8 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
1449 | 1448 | ||
1450 | /* add this new MC control structure to EDAC's list of MCs */ | 1449 | /* add this new MC control structure to EDAC's list of MCs */ |
1451 | if (edac_mc_add_mc(mci)) { | 1450 | if (edac_mc_add_mc(mci)) { |
1452 | debugf0("MC: %s: %s(): failed edac_mc_add_mc()\n", | 1451 | debugf0("MC: %s(): failed edac_mc_add_mc()\n", |
1453 | __FILE__, __func__); | 1452 | __FILE__); |
1454 | /* FIXME: perhaps some code should go here that disables error | 1453 | /* FIXME: perhaps some code should go here that disables error |
1455 | * reporting if we just enabled it | 1454 | * reporting if we just enabled it |
1456 | */ | 1455 | */ |
@@ -1494,7 +1493,7 @@ static int __devinit i5000_init_one(struct pci_dev *pdev, | |||
1494 | { | 1493 | { |
1495 | int rc; | 1494 | int rc; |
1496 | 1495 | ||
1497 | debugf0("MC: %s: %s()\n", __FILE__, __func__); | 1496 | debugf0("MC: %s()\n", __FILE__); |
1498 | 1497 | ||
1499 | /* wake up device */ | 1498 | /* wake up device */ |
1500 | rc = pci_enable_device(pdev); | 1499 | rc = pci_enable_device(pdev); |
@@ -1513,7 +1512,7 @@ static void __devexit i5000_remove_one(struct pci_dev *pdev) | |||
1513 | { | 1512 | { |
1514 | struct mem_ctl_info *mci; | 1513 | struct mem_ctl_info *mci; |
1515 | 1514 | ||
1516 | debugf0("%s: %s()\n", __FILE__, __func__); | 1515 | debugf0("%s()\n", __FILE__); |
1517 | 1516 | ||
1518 | if (i5000_pci) | 1517 | if (i5000_pci) |
1519 | edac_pci_release_generic_ctl(i5000_pci); | 1518 | edac_pci_release_generic_ctl(i5000_pci); |
@@ -1559,7 +1558,7 @@ static int __init i5000_init(void) | |||
1559 | { | 1558 | { |
1560 | int pci_rc; | 1559 | int pci_rc; |
1561 | 1560 | ||
1562 | debugf2("MC: %s: %s()\n", __FILE__, __func__); | 1561 | debugf2("MC: %s()\n", __FILE__); |
1563 | 1562 | ||
1564 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | 1563 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ |
1565 | opstate_init(); | 1564 | opstate_init(); |
@@ -1575,7 +1574,7 @@ static int __init i5000_init(void) | |||
1575 | */ | 1574 | */ |
1576 | static void __exit i5000_exit(void) | 1575 | static void __exit i5000_exit(void) |
1577 | { | 1576 | { |
1578 | debugf2("MC: %s: %s()\n", __FILE__, __func__); | 1577 | debugf2("MC: %s()\n", __FILE__); |
1579 | pci_unregister_driver(&i5000_driver); | 1578 | pci_unregister_driver(&i5000_driver); |
1580 | } | 1579 | } |
1581 | 1580 | ||