lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 3 Feb 2021 09:44:38 +0800
From:   Hanjun Guo <guohanjun@...wei.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux ACPI <linux-acpi@...r.kernel.org>
CC:     Linux PM <linux-pm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Erik Kaneda <erik.kaneda@...el.com>,
        "Joe Perches" <joe@...ches.com>
Subject: Re: [PATCH v2 2/5] ACPI: battery: Clean up printing messages

On 2021/2/3 2:15, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Replace the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances
> in battery.c with acpi_handle_debug() and acpi_handle_info() calls,
> respectively, which among other things causes the excessive log
> level of the messages previously printed via ACPI_EXCEPTION() to
> be more adequate.
> 
> Drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not
> used any more, drop the no longer needed ACPI_BATTERY_COMPONENT
> definition from the headers and update the documentation accordingly.
> 
> While at it, update the pr_fmt() definition and drop the unneeded
> PREFIX sybmbol definition from battery.c.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> 
> v1 -> v2: Changelog update
> 
> ---
>   Documentation/firmware-guide/acpi/debug.rst |    1
>   drivers/acpi/battery.c                      |   29 ++++++++++++++--------------
>   drivers/acpi/sysfs.c                        |    1
>   include/acpi/acpi_drivers.h                 |    1
>   4 files changed, 15 insertions(+), 17 deletions(-)
> 
> Index: linux-pm/drivers/acpi/battery.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/battery.c
> +++ linux-pm/drivers/acpi/battery.c
> @@ -8,7 +8,7 @@
>    *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@...el.com>
>    */
>   
> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +#define pr_fmt(fmt) "ACPI: battery: " fmt
>   
[...]
>   
> -	pr_info(PREFIX "%s Slot [%s] (battery %s)\n",
> +	pr_info("%s Slot [%s] (battery %s)\n",
>   		ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device),
>   		device->status.battery_present ? "present" : "absent");

Will print:
ACPI: battery: Battery Slot ...

How about:
ACPI: battery: Slot ...

>   
> @@ -1282,7 +1283,7 @@ static void __init acpi_battery_init_asy
>   	if (battery_check_pmic) {
>   		for (i = 0; i < ARRAY_SIZE(acpi_battery_blacklist); i++)
>   			if (acpi_dev_present(acpi_battery_blacklist[i], "1", -1)) {
> -				pr_info(PREFIX ACPI_BATTERY_DEVICE_NAME
> +				pr_info(ACPI_BATTERY_DEVICE_NAME
>   					": found native %s PMIC, not loading\n",
>   					acpi_battery_blacklist[i]);

Will print:
ACPI: battery: Battery: found native...

will be better for
ACPI: battery: found native

So I think we can remove ACPI_BATTERY_DEVICE_NAME in pr_info()

Thanks
Hanjun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ