diff options
author | Hanjun Guo <guohanjun@huawei.com> | 2021-06-02 11:54:35 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-06-07 16:36:46 +0300 |
commit | 86ca3b0ab41f7172b963a38074612f8e5f1851e1 (patch) | |
tree | ea4936bd0fe7f5c914b5e4d2ad97573a9b38a706 /drivers/acpi/sysfs.c | |
parent | 6ecfe60a13b1b27c7bc60892fa8116b223ce4a6b (diff) | |
download | linux-86ca3b0ab41f7172b963a38074612f8e5f1851e1.tar.xz |
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: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r-- | drivers/acpi/sysfs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index d25927195d6d..88629d26bd48 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -359,8 +359,7 @@ static int acpi_table_attr_init(struct kobject *tables_obj, } table_attr->instance++; if (table_attr->instance > ACPI_MAX_TABLE_INSTANCES) { - pr_warn("%4.4s: too many table instances\n", - table_attr->name); + pr_warn("%4.4s: too many table instances\n", table_attr->name); return -ERANGE; } @@ -737,8 +736,7 @@ static ssize_t counter_set(struct kobject *kobj, goto end; if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) { - printk(KERN_WARNING PREFIX - "Can not change Invalid GPE/Fixed Event status\n"); + pr_warn("Can not change Invalid GPE/Fixed Event status\n"); return -EINVAL; } @@ -983,7 +981,7 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, return; 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, |