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/edac_mc_sysfs.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/edac_mc_sysfs.c')
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 87b8d7d6385f..f72de8ba6a3b 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
@@ -376,8 +376,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci, | |||
376 | dev_set_name(&csrow->dev, "csrow%d", index); | 376 | dev_set_name(&csrow->dev, "csrow%d", index); |
377 | dev_set_drvdata(&csrow->dev, csrow); | 377 | dev_set_drvdata(&csrow->dev, csrow); |
378 | 378 | ||
379 | debugf0("%s(): creating (virtual) csrow node %s\n", __func__, | 379 | debugf0("creating (virtual) csrow node %s\n", dev_name(&csrow->dev)); |
380 | dev_name(&csrow->dev)); | ||
381 | 380 | ||
382 | err = device_add(&csrow->dev); | 381 | err = device_add(&csrow->dev); |
383 | if (err < 0) | 382 | if (err < 0) |
@@ -623,8 +622,7 @@ static int edac_create_dimm_object(struct mem_ctl_info *mci, | |||
623 | 622 | ||
624 | err = device_add(&dimm->dev); | 623 | err = device_add(&dimm->dev); |
625 | 624 | ||
626 | debugf0("%s(): creating rank/dimm device %s\n", __func__, | 625 | debugf0("creating rank/dimm device %s\n", dev_name(&dimm->dev)); |
627 | dev_name(&dimm->dev)); | ||
628 | 626 | ||
629 | return err; | 627 | return err; |
630 | } | 628 | } |
@@ -981,8 +979,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) | |||
981 | dev_set_drvdata(&mci->dev, mci); | 979 | dev_set_drvdata(&mci->dev, mci); |
982 | pm_runtime_forbid(&mci->dev); | 980 | pm_runtime_forbid(&mci->dev); |
983 | 981 | ||
984 | debugf0("%s(): creating device %s\n", __func__, | 982 | debugf0("creating device %s\n", dev_name(&mci->dev)); |
985 | dev_name(&mci->dev)); | ||
986 | err = device_add(&mci->dev); | 983 | err = device_add(&mci->dev); |
987 | if (err < 0) { | 984 | if (err < 0) { |
988 | bus_unregister(&mci->bus); | 985 | bus_unregister(&mci->bus); |
@@ -999,8 +996,8 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) | |||
999 | if (dimm->nr_pages == 0) | 996 | if (dimm->nr_pages == 0) |
1000 | continue; | 997 | continue; |
1001 | #ifdef CONFIG_EDAC_DEBUG | 998 | #ifdef CONFIG_EDAC_DEBUG |
1002 | debugf1("%s creating dimm%d, located at ", | 999 | debugf1("creating dimm%d, located at ", |
1003 | __func__, i); | 1000 | i); |
1004 | if (edac_debug_level >= 1) { | 1001 | if (edac_debug_level >= 1) { |
1005 | int lay; | 1002 | int lay; |
1006 | for (lay = 0; lay < mci->n_layers; lay++) | 1003 | for (lay = 0; lay < mci->n_layers; lay++) |
@@ -1012,8 +1009,8 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) | |||
1012 | #endif | 1009 | #endif |
1013 | err = edac_create_dimm_object(mci, dimm, i); | 1010 | err = edac_create_dimm_object(mci, dimm, i); |
1014 | if (err) { | 1011 | if (err) { |
1015 | debugf1("%s() failure: create dimm %d obj\n", | 1012 | debugf1("failure: create dimm %d obj\n", |
1016 | __func__, i); | 1013 | i); |
1017 | goto fail; | 1014 | goto fail; |
1018 | } | 1015 | } |
1019 | } | 1016 | } |
@@ -1051,7 +1048,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
1051 | { | 1048 | { |
1052 | int i; | 1049 | int i; |
1053 | 1050 | ||
1054 | debugf0("%s()\n", __func__); | 1051 | debugf0("\n"); |
1055 | 1052 | ||
1056 | #ifdef CONFIG_EDAC_DEBUG | 1053 | #ifdef CONFIG_EDAC_DEBUG |
1057 | debugfs_remove(mci->debugfs); | 1054 | debugfs_remove(mci->debugfs); |
@@ -1064,8 +1061,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
1064 | struct dimm_info *dimm = mci->dimms[i]; | 1061 | struct dimm_info *dimm = mci->dimms[i]; |
1065 | if (dimm->nr_pages == 0) | 1062 | if (dimm->nr_pages == 0) |
1066 | continue; | 1063 | continue; |
1067 | debugf0("%s(): removing device %s\n", __func__, | 1064 | debugf0("removing device %s\n", dev_name(&dimm->dev)); |
1068 | dev_name(&dimm->dev)); | ||
1069 | put_device(&dimm->dev); | 1065 | put_device(&dimm->dev); |
1070 | device_del(&dimm->dev); | 1066 | device_del(&dimm->dev); |
1071 | } | 1067 | } |
@@ -1105,7 +1101,7 @@ int __init edac_mc_sysfs_init(void) | |||
1105 | /* get the /sys/devices/system/edac subsys reference */ | 1101 | /* get the /sys/devices/system/edac subsys reference */ |
1106 | edac_subsys = edac_get_sysfs_subsys(); | 1102 | edac_subsys = edac_get_sysfs_subsys(); |
1107 | if (edac_subsys == NULL) { | 1103 | if (edac_subsys == NULL) { |
1108 | debugf1("%s() no edac_subsys\n", __func__); | 1104 | debugf1("no edac_subsys\n"); |
1109 | return -EINVAL; | 1105 | return -EINVAL; |
1110 | } | 1106 | } |
1111 | 1107 | ||