aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i7300_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/i7300_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/i7300_edac.c')
-rw-r--r--drivers/edac/i7300_edac.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
index db84456e65d9..20435ee47077 100644
--- a/drivers/edac/i7300_edac.c
+++ b/drivers/edac/i7300_edac.c
@@ -1032,8 +1032,7 @@ static int __devinit i7300_init_one(struct pci_dev *pdev,
1032 if (rc == -EIO) 1032 if (rc == -EIO)
1033 return rc; 1033 return rc;
1034 1034
1035 debugf0("MC: " __FILE__ ": %s(), pdev bus %u dev=0x%x fn=0x%x\n", 1035 debugf0("MC: pdev bus %u dev=0x%x fn=0x%x\n",
1036 __func__,
1037 pdev->bus->number, 1036 pdev->bus->number,
1038 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1037 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
1039 1038
@@ -1055,7 +1054,7 @@ static int __devinit i7300_init_one(struct pci_dev *pdev,
1055 if (mci == NULL) 1054 if (mci == NULL)
1056 return -ENOMEM; 1055 return -ENOMEM;
1057 1056
1058 debugf0("MC: " __FILE__ ": %s(): mci = %p\n", __func__, mci); 1057 debugf0("MC: mci = %p\n", mci);
1059 1058
1060 mci->pdev = &pdev->dev; /* record ptr to the generic device */ 1059 mci->pdev = &pdev->dev; /* record ptr to the generic device */
1061 1060
@@ -1099,8 +1098,7 @@ static int __devinit i7300_init_one(struct pci_dev *pdev,
1099 1098
1100 /* add this new MC control structure to EDAC's list of MCs */ 1099 /* add this new MC control structure to EDAC's list of MCs */
1101 if (edac_mc_add_mc(mci)) { 1100 if (edac_mc_add_mc(mci)) {
1102 debugf0("MC: " __FILE__ 1101 debugf0("MC: failed edac_mc_add_mc()\n");
1103 ": %s(): failed edac_mc_add_mc()\n", __func__);
1104 /* FIXME: perhaps some code should go here that disables error 1102 /* FIXME: perhaps some code should go here that disables error
1105 * reporting if we just enabled it 1103 * reporting if we just enabled it
1106 */ 1104 */
@@ -1142,7 +1140,7 @@ static void __devexit i7300_remove_one(struct pci_dev *pdev)
1142 struct mem_ctl_info *mci; 1140 struct mem_ctl_info *mci;
1143 char *tmp; 1141 char *tmp;
1144 1142
1145 debugf0(__FILE__ ": %s()\n", __func__); 1143 debugf0("\n");
1146 1144
1147 if (i7300_pci) 1145 if (i7300_pci)
1148 edac_pci_release_generic_ctl(i7300_pci); 1146 edac_pci_release_generic_ctl(i7300_pci);
@@ -1189,7 +1187,7 @@ static int __init i7300_init(void)
1189{ 1187{
1190 int pci_rc; 1188 int pci_rc;
1191 1189
1192 debugf2("MC: " __FILE__ ": %s()\n", __func__); 1190 debugf2("\n");
1193 1191
1194 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 1192 /* Ensure that the OPSTATE is set correctly for POLL or NMI */
1195 opstate_init(); 1193 opstate_init();
@@ -1204,7 +1202,7 @@ static int __init i7300_init(void)
1204 */ 1202 */
1205static void __exit i7300_exit(void) 1203static void __exit i7300_exit(void)
1206{ 1204{
1207 debugf2("MC: " __FILE__ ": %s()\n", __func__); 1205 debugf2("\n");
1208 pci_unregister_driver(&i7300_driver); 1206 pci_unregister_driver(&i7300_driver);
1209} 1207}
1210 1208