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, 31 May 2023 09:58:09 +0200
From:   "Wilczynski, Michal" <michal.wilczynski@...el.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux ACPI <linux-acpi@...r.kernel.org>
CC:     LKML <linux-kernel@...r.kernel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>
Subject: Re: [PATCH v1 3/5] ACPI: thermal: Move symbol definitions to one
 place



On 5/30/2023 5:44 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Move all of the symbol definitions to the initial part of the code so
> they all can be found in one place.
>
> While at it, consolidate white space used in there.
>
> No functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>  drivers/acpi/thermal.c |   58 ++++++++++++++++++++++++-------------------------
>  1 file changed, 29 insertions(+), 29 deletions(-)
>
> Index: linux-pm/drivers/acpi/thermal.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/thermal.c
> +++ linux-pm/drivers/acpi/thermal.c
> @@ -40,8 +40,35 @@
>  #define ACPI_THERMAL_NOTIFY_HOT		0xF1
>  #define ACPI_THERMAL_MODE_ACTIVE	0x00
>  
> -#define ACPI_THERMAL_MAX_ACTIVE	10
> -#define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65
> +#define ACPI_THERMAL_MAX_ACTIVE		10
> +#define ACPI_THERMAL_MAX_LIMIT_STR_LEN	65
> +
> +#define ACPI_TRIPS_CRITICAL	BIT(0)
> +#define ACPI_TRIPS_HOT		BIT(1)
> +#define ACPI_TRIPS_PASSIVE	BIT(2)
> +#define ACPI_TRIPS_ACTIVE	BIT(3)
> +#define ACPI_TRIPS_DEVICES	BIT(4)
> +
> +#define ACPI_TRIPS_THRESHOLDS	(ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE)
> +
> +#define ACPI_TRIPS_INIT		(ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \
> +				 ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \
> +				 ACPI_TRIPS_DEVICES)
> +
> +/*
> + * This exception is thrown out in two cases:
> + * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid
> + *   when re-evaluating the AML code.
> + * 2.TODO: Devices listed in _PSL, _ALx, _TZD may change.
> + *   We need to re-bind the cooling devices of a thermal zone when this occurs.
> + */
> +#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \
> +do { \
> +	if (flags != ACPI_TRIPS_INIT) \
> +		acpi_handle_info(tz->device->handle, \
> +			"ACPI thermal trip point %s changed\n" \
> +			"Please report to linux-acpi@...r.kernel.org\n", str); \
> +} while (0)
>  
>  MODULE_AUTHOR("Paul Diefenbaugh");
>  MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
> @@ -232,33 +259,6 @@ static int acpi_thermal_set_cooling_mode
>  	return 0;
>  }
>  
> -#define ACPI_TRIPS_CRITICAL	BIT(0)
> -#define ACPI_TRIPS_HOT		BIT(1)
> -#define ACPI_TRIPS_PASSIVE	BIT(2)
> -#define ACPI_TRIPS_ACTIVE	BIT(3)
> -#define ACPI_TRIPS_DEVICES	BIT(4)
> -
> -#define ACPI_TRIPS_THRESHOLDS	(ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE)
> -
> -#define ACPI_TRIPS_INIT		(ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \
> -				 ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \
> -				 ACPI_TRIPS_DEVICES)
> -
> -/*
> - * This exception is thrown out in two cases:
> - * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid
> - *   when re-evaluating the AML code.
> - * 2.TODO: Devices listed in _PSL, _ALx, _TZD may change.
> - *   We need to re-bind the cooling devices of a thermal zone when this occurs.
> - */
> -#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str)	\
> -do {	\
> -	if (flags != ACPI_TRIPS_INIT)	\
> -		acpi_handle_info(tz->device->handle,	\
> -		"ACPI thermal trip point %s changed\n"	\
> -		"Please report to linux-acpi@...r.kernel.org\n", str); \
> -} while (0)
> -
>  static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
>  {
>  	acpi_status status;

Reviewed-by: Michal Wilczynski <michal.wilczynski@...el.com>

>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ