Commit 86ca3b0a authored by Hanjun Guo's avatar Hanjun Guo Committed by Rafael J. Wysocki

ACPI: sysfs: Cleanup message printing

We have pr_fmt() in sysfs.c but we still use pr_err(PREFIX ...) which
is wrong, remove the duplicated PREFIX and also using pr_* to replace
printk to simlify the code.
Signed-off-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 6ecfe60a
...@@ -359,8 +359,7 @@ static int acpi_table_attr_init(struct kobject *tables_obj, ...@@ -359,8 +359,7 @@ static int acpi_table_attr_init(struct kobject *tables_obj,
} }
table_attr->instance++; table_attr->instance++;
if (table_attr->instance > ACPI_MAX_TABLE_INSTANCES) { if (table_attr->instance > ACPI_MAX_TABLE_INSTANCES) {
pr_warn("%4.4s: too many table instances\n", pr_warn("%4.4s: too many table instances\n", table_attr->name);
table_attr->name);
return -ERANGE; return -ERANGE;
} }
...@@ -737,8 +736,7 @@ static ssize_t counter_set(struct kobject *kobj, ...@@ -737,8 +736,7 @@ static ssize_t counter_set(struct kobject *kobj,
goto end; goto end;
if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) { if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) {
printk(KERN_WARNING PREFIX pr_warn("Can not change Invalid GPE/Fixed Event status\n");
"Can not change Invalid GPE/Fixed Event status\n");
return -EINVAL; return -EINVAL;
} }
...@@ -983,7 +981,7 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, ...@@ -983,7 +981,7 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
return; return;
err_out: err_out:
pr_err(PREFIX "Unable to add hotplug profile '%s'\n", name); pr_err("Unable to add hotplug profile '%s'\n", name);
} }
static ssize_t force_remove_show(struct kobject *kobj, static ssize_t force_remove_show(struct kobject *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