Skip to content

Commit 86ca3b0

Browse files
guohanjunrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 6ecfe60 commit 86ca3b0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/acpi/sysfs.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,7 @@ static int acpi_table_attr_init(struct kobject *tables_obj,
359359
}
360360
table_attr->instance++;
361361
if (table_attr->instance > ACPI_MAX_TABLE_INSTANCES) {
362-
pr_warn("%4.4s: too many table instances\n",
363-
table_attr->name);
362+
pr_warn("%4.4s: too many table instances\n", table_attr->name);
364363
return -ERANGE;
365364
}
366365

@@ -737,8 +736,7 @@ static ssize_t counter_set(struct kobject *kobj,
737736
goto end;
738737

739738
if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) {
740-
printk(KERN_WARNING PREFIX
741-
"Can not change Invalid GPE/Fixed Event status\n");
739+
pr_warn("Can not change Invalid GPE/Fixed Event status\n");
742740
return -EINVAL;
743741
}
744742

@@ -983,7 +981,7 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
983981
return;
984982

985983
err_out:
986-
pr_err(PREFIX "Unable to add hotplug profile '%s'\n", name);
984+
pr_err("Unable to add hotplug profile '%s'\n", name);
987985
}
988986

989987
static ssize_t force_remove_show(struct kobject *kobj,

0 commit comments

Comments
 (0)