Commit eecc5bbc authored by Joe Perches's avatar Joe Perches Committed by Matthew Garrett

acerhdf: Message logging neatening

Use pr_warn not pr_warning.
Coalesce formats.
Argument aligning.
Remove superfluous parentheses.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarLee, Chun-Yi <jlee@suse.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 6e71f38b
...@@ -244,12 +244,11 @@ static void acerhdf_change_fanstate(int state) ...@@ -244,12 +244,11 @@ static void acerhdf_change_fanstate(int state)
unsigned char cmd; unsigned char cmd;
if (verbose) if (verbose)
pr_notice("fan %s\n", (state == ACERHDF_FAN_OFF) ? pr_notice("fan %s\n", state == ACERHDF_FAN_OFF ? "OFF" : "ON");
"OFF" : "ON");
if ((state != ACERHDF_FAN_OFF) && (state != ACERHDF_FAN_AUTO)) { if ((state != ACERHDF_FAN_OFF) && (state != ACERHDF_FAN_AUTO)) {
pr_err("invalid fan state %d requested, setting to auto!\n", pr_err("invalid fan state %d requested, setting to auto!\n",
state); state);
state = ACERHDF_FAN_AUTO; state = ACERHDF_FAN_AUTO;
} }
...@@ -264,19 +263,18 @@ static void acerhdf_check_param(struct thermal_zone_device *thermal) ...@@ -264,19 +263,18 @@ static void acerhdf_check_param(struct thermal_zone_device *thermal)
{ {
if (fanon > ACERHDF_MAX_FANON) { if (fanon > ACERHDF_MAX_FANON) {
pr_err("fanon temperature too high, set to %d\n", pr_err("fanon temperature too high, set to %d\n",
ACERHDF_MAX_FANON); ACERHDF_MAX_FANON);
fanon = ACERHDF_MAX_FANON; fanon = ACERHDF_MAX_FANON;
} }
if (kernelmode && prev_interval != interval) { if (kernelmode && prev_interval != interval) {
if (interval > ACERHDF_MAX_INTERVAL) { if (interval > ACERHDF_MAX_INTERVAL) {
pr_err("interval too high, set to %d\n", pr_err("interval too high, set to %d\n",
ACERHDF_MAX_INTERVAL); ACERHDF_MAX_INTERVAL);
interval = ACERHDF_MAX_INTERVAL; interval = ACERHDF_MAX_INTERVAL;
} }
if (verbose) if (verbose)
pr_notice("interval changed to: %d\n", pr_notice("interval changed to: %d\n", interval);
interval);
thermal->polling_delay = interval*1000; thermal->polling_delay = interval*1000;
prev_interval = interval; prev_interval = interval;
} }
...@@ -587,8 +585,8 @@ static int acerhdf_check_hardware(void) ...@@ -587,8 +585,8 @@ static int acerhdf_check_hardware(void)
} }
if (!bios_cfg) { if (!bios_cfg) {
pr_err("unknown (unsupported) BIOS version %s/%s/%s, " pr_err("unknown (unsupported) BIOS version %s/%s/%s, please report, aborting!\n",
"please report, aborting!\n", vendor, product, version); vendor, product, version);
return -EINVAL; return -EINVAL;
} }
...@@ -598,8 +596,7 @@ static int acerhdf_check_hardware(void) ...@@ -598,8 +596,7 @@ static int acerhdf_check_hardware(void)
*/ */
if (!kernelmode) { if (!kernelmode) {
pr_notice("Fan control off, to enable do:\n"); pr_notice("Fan control off, to enable do:\n");
pr_notice("echo -n \"enabled\" > " pr_notice("echo -n \"enabled\" > /sys/class/thermal/thermal_zone0/mode\n");
"/sys/class/thermal/thermal_zone0/mode\n");
} }
return 0; return 0;
......
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