Commit b6a280bb authored by Borislav Petkov's avatar Borislav Petkov

EDAC: Shut up sysfs registration debug code

Raise the debug level of these routines so that their output get issued
out only when the highest debug level is selected. Otherwise, don't
pollute driver debug output.
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent 521cb40b
...@@ -785,10 +785,10 @@ static int edac_create_mci_instance_attributes(struct mem_ctl_info *mci, ...@@ -785,10 +785,10 @@ static int edac_create_mci_instance_attributes(struct mem_ctl_info *mci,
{ {
int err; int err;
debugf1("%s()\n", __func__); debugf4("%s()\n", __func__);
while (sysfs_attrib) { while (sysfs_attrib) {
debugf1("%s() sysfs_attrib = %p\n",__func__, sysfs_attrib); debugf4("%s() sysfs_attrib = %p\n",__func__, sysfs_attrib);
if (sysfs_attrib->grp) { if (sysfs_attrib->grp) {
struct mcidev_sysfs_group_kobj *grp_kobj; struct mcidev_sysfs_group_kobj *grp_kobj;
...@@ -818,7 +818,7 @@ static int edac_create_mci_instance_attributes(struct mem_ctl_info *mci, ...@@ -818,7 +818,7 @@ static int edac_create_mci_instance_attributes(struct mem_ctl_info *mci,
if (err < 0) if (err < 0)
return err; return err;
} else if (sysfs_attrib->attr.name) { } else if (sysfs_attrib->attr.name) {
debugf0("%s() file %s\n", __func__, debugf4("%s() file %s\n", __func__,
sysfs_attrib->attr.name); sysfs_attrib->attr.name);
err = sysfs_create_file(kobj, &sysfs_attrib->attr); err = sysfs_create_file(kobj, &sysfs_attrib->attr);
...@@ -853,26 +853,26 @@ static void edac_remove_mci_instance_attributes(struct mem_ctl_info *mci, ...@@ -853,26 +853,26 @@ static void edac_remove_mci_instance_attributes(struct mem_ctl_info *mci,
* Remove first all the atributes * Remove first all the atributes
*/ */
while (sysfs_attrib) { while (sysfs_attrib) {
debugf1("%s() sysfs_attrib = %p\n",__func__, sysfs_attrib); debugf4("%s() sysfs_attrib = %p\n",__func__, sysfs_attrib);
if (sysfs_attrib->grp) { if (sysfs_attrib->grp) {
debugf1("%s() seeking for group %s\n", debugf4("%s() seeking for group %s\n",
__func__, sysfs_attrib->grp->name); __func__, sysfs_attrib->grp->name);
list_for_each_entry(grp_kobj, list_for_each_entry(grp_kobj,
&mci->grp_kobj_list, list) { &mci->grp_kobj_list, list) {
debugf1("%s() grp_kobj->grp = %p\n",__func__, grp_kobj->grp); debugf4("%s() grp_kobj->grp = %p\n",__func__, grp_kobj->grp);
if (grp_kobj->grp == sysfs_attrib->grp) { if (grp_kobj->grp == sysfs_attrib->grp) {
edac_remove_mci_instance_attributes(mci, edac_remove_mci_instance_attributes(mci,
grp_kobj->grp->mcidev_attr, grp_kobj->grp->mcidev_attr,
&grp_kobj->kobj, count + 1); &grp_kobj->kobj, count + 1);
debugf0("%s() group %s\n", __func__, debugf4("%s() group %s\n", __func__,
sysfs_attrib->grp->name); sysfs_attrib->grp->name);
kobject_put(&grp_kobj->kobj); kobject_put(&grp_kobj->kobj);
} }
} }
debugf1("%s() end of seeking for group %s\n", debugf4("%s() end of seeking for group %s\n",
__func__, sysfs_attrib->grp->name); __func__, sysfs_attrib->grp->name);
} else if (sysfs_attrib->attr.name) { } else if (sysfs_attrib->attr.name) {
debugf0("%s() file %s\n", __func__, debugf4("%s() file %s\n", __func__,
sysfs_attrib->attr.name); sysfs_attrib->attr.name);
sysfs_remove_file(kobj, &sysfs_attrib->attr); sysfs_remove_file(kobj, &sysfs_attrib->attr);
} else } else
...@@ -979,7 +979,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) ...@@ -979,7 +979,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
debugf0("%s()\n", __func__); debugf0("%s()\n", __func__);
/* remove all csrow kobjects */ /* remove all csrow kobjects */
debugf0("%s() unregister this mci kobj\n", __func__); debugf4("%s() unregister this mci kobj\n", __func__);
for (i = 0; i < mci->nr_csrows; i++) { for (i = 0; i < mci->nr_csrows; i++) {
if (mci->csrows[i].nr_pages > 0) { if (mci->csrows[i].nr_pages > 0) {
debugf0("%s() unreg csrow-%d\n", __func__, i); debugf0("%s() unreg csrow-%d\n", __func__, i);
...@@ -989,18 +989,18 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) ...@@ -989,18 +989,18 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
/* remove this mci instance's attribtes */ /* remove this mci instance's attribtes */
if (mci->mc_driver_sysfs_attributes) { if (mci->mc_driver_sysfs_attributes) {
debugf0("%s() unregister mci private attributes\n", __func__); debugf4("%s() unregister mci private attributes\n", __func__);
edac_remove_mci_instance_attributes(mci, edac_remove_mci_instance_attributes(mci,
mci->mc_driver_sysfs_attributes, mci->mc_driver_sysfs_attributes,
&mci->edac_mci_kobj, 0); &mci->edac_mci_kobj, 0);
} }
/* remove the symlink */ /* remove the symlink */
debugf0("%s() remove_link\n", __func__); debugf4("%s() remove_link\n", __func__);
sysfs_remove_link(&mci->edac_mci_kobj, EDAC_DEVICE_SYMLINK); sysfs_remove_link(&mci->edac_mci_kobj, EDAC_DEVICE_SYMLINK);
/* unregister this instance's kobject */ /* unregister this instance's kobject */
debugf0("%s() remove_mci_instance\n", __func__); debugf4("%s() remove_mci_instance\n", __func__);
kobject_put(&mci->edac_mci_kobj); kobject_put(&mci->edac_mci_kobj);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment