2012-11-29 11:53:23

by Colin King

[permalink] [raw]
Subject: [PATCH 0/5] remove some unnecessary newline from error messages

From: Colin Ian King <[email protected]>

The ACPI_EXCEPTION and ACPI_ERROR macros already emit a newline after
the message, so remove the unnecessary newlines from a bunch of messages.

Colin Ian King (5):
ACPI dock: remove unnecessary newline from exception message
ACPI video: remove unnecessary newline from error messages
ACPI sysfs: remove unnecessary newline from exception
ACPICA: GPE support: remove unnecessary newline from error messages
ACPI thermal: remove unnecessary newline from exception message

drivers/acpi/acpica/hwgpe.c | 2 +-
drivers/acpi/dock.c | 2 +-
drivers/acpi/sysfs.c | 2 +-
drivers/acpi/thermal.c | 2 +-
drivers/acpi/video.c | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)

--
1.8.0


2012-11-29 11:53:27

by Colin King

[permalink] [raw]
Subject: [PATCH 3/5] ACPI sysfs: remove unnecessary newline from exception

From: Colin Ian King <[email protected]>

ACPI_EXCEPTION() already appends a newline, so there is no
need for the invalid GPE message to include one too.

Signed-off-by: Colin Ian King <[email protected]>
---
drivers/acpi/sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index 7c3f98b..9fc5379 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -498,7 +498,7 @@ static int get_status(u32 index, acpi_event_status *status,
result = acpi_get_gpe_device(index, handle);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
- "Invalid GPE 0x%x\n", index));
+ "Invalid GPE 0x%x", index));
goto end;
}
result = acpi_get_gpe_status(*handle, index, status);
--
1.8.0

2012-11-29 11:53:26

by Colin King

[permalink] [raw]
Subject: [PATCH 2/5] ACPI video: remove unnecessary newline from error messages

From: Colin Ian King <[email protected]>

ACPI_ERROR() already appends a newline, so there is no
need for the error messages to include one too.

Signed-off-by: Colin Ian King <[email protected]>
---
drivers/acpi/video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 0230cb6..bac0768 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -659,7 +659,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
br->levels[i] = br->levels[i - level_ac_battery];
count += level_ac_battery;
} else if (level_ac_battery > 2)
- ACPI_ERROR((AE_INFO, "Too many duplicates in _BCL package\n"));
+ ACPI_ERROR((AE_INFO, "Too many duplicates in _BCL package"));

/* Check if the _BCL package is in a reversed order */
if (max_level == br->levels[2]) {
@@ -668,7 +668,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
acpi_video_cmp_level, NULL);
} else if (max_level != br->levels[count - 1])
ACPI_ERROR((AE_INFO,
- "Found unordered _BCL package\n"));
+ "Found unordered _BCL package"));

br->count = count;
device->brightness = br;
--
1.8.0

2012-11-29 11:53:25

by Colin King

[permalink] [raw]
Subject: [PATCH 4/5] ACPICA: GPE support: remove unnecessary newline from error messages

From: Colin Ian King <[email protected]>

ACPI_ERROR() already appends a newline, so there is no
need for the error messages to include one too.

Signed-off-by: Colin Ian King <[email protected]>
---
drivers/acpi/acpica/hwgpe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index db40765..610ed72 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -134,7 +134,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
break;

default:
- ACPI_ERROR((AE_INFO, "Invalid GPE Action, %u\n", action));
+ ACPI_ERROR((AE_INFO, "Invalid GPE Action, %u", action));
return (AE_BAD_PARAMETER);
}

--
1.8.0

2012-11-29 11:53:24

by Colin King

[permalink] [raw]
Subject: [PATCH 5/5] ACPI thermal: remove unnecessary newline from exception message

From: Colin Ian King <[email protected]>

ACPI_EXCEPTION() already appends a newline, so there is no
need for the thermal trip point message to include one too.

Signed-off-by: Colin Ian King <[email protected]>
---
drivers/acpi/thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 804204d..2020d44 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -288,7 +288,7 @@ do { \
if (flags != ACPI_TRIPS_INIT) \
ACPI_EXCEPTION((AE_INFO, AE_ERROR, \
"ACPI thermal trip point %s changed\n" \
- "Please send acpidump to [email protected]\n", str)); \
+ "Please send acpidump to [email protected]", str)); \
} while (0)

static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
--
1.8.0

2012-11-29 11:54:58

by Colin King

[permalink] [raw]
Subject: [PATCH 1/5] ACPI dock: remove unnecessary newline from exception message

From: Colin Ian King <[email protected]>

ACPI_EXCEPTION() already appends a newline, so there is no
need for the failed _DCK messaged to include one too.

Signed-off-by: Colin Ian King <[email protected]>
---
drivers/acpi/dock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 88eb143..a873c6b 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -475,7 +475,7 @@ static void handle_dock(struct dock_station *ds, int dock)
status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
ACPI_EXCEPTION((AE_INFO, status, "%s - failed to execute"
- " _DCK\n", (char *)name_buffer.pointer));
+ " _DCK", (char *)name_buffer.pointer));

kfree(buffer.pointer);
kfree(name_buffer.pointer);
--
1.8.0

2012-11-29 18:33:46

by Toshi Kani

[permalink] [raw]
Subject: Re: [PATCH 1/5] ACPI dock: remove unnecessary newline from exception message

On Thu, 2012-11-29 at 11:53 +0000, Colin King wrote:
> From: Colin Ian King <[email protected]>
>
> ACPI_EXCEPTION() already appends a newline, so there is no
> need for the failed _DCK messaged to include one too.
>
> Signed-off-by: Colin Ian King <[email protected]>
> ---
> drivers/acpi/dock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
> index 88eb143..a873c6b 100644
> --- a/drivers/acpi/dock.c
> +++ b/drivers/acpi/dock.c
> @@ -475,7 +475,7 @@ static void handle_dock(struct dock_station *ds, int dock)
> status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer);
> if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
> ACPI_EXCEPTION((AE_INFO, status, "%s - failed to execute"
> - " _DCK\n", (char *)name_buffer.pointer));
> + " _DCK", (char *)name_buffer.pointer));

Hi Colin,

In Rafael's linux-pm tree, this message has been changed to the
following. So, this patch is not necessary.

if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
acpi_handle_err(ds->handle, "Failed to execute _DCK (0x%x)\n",
status);

Thanks,
-Toshi


>
> kfree(buffer.pointer);
> kfree(name_buffer.pointer);