* [PATCH] ACPI: thermal: drop an always true check
@ 2021-11-15 17:32 Adam Borowski
2021-11-16 19:33 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Adam Borowski @ 2021-11-15 17:32 UTC (permalink / raw)
To: Rafael J. Wysocki, Zhang Rui, Len Brown, linux-acpi; +Cc: Adam Borowski
Address of a field inside a struct can't possibly be null; gcc-12 warns
about this.
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
drivers/acpi/thermal.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 95105db642b9..155bbabcc6f5 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1098,8 +1098,6 @@ static int acpi_thermal_resume(struct device *dev)
return -EINVAL;
for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
- if (!(&tz->trips.active[i]))
- break;
if (!tz->trips.active[i].flags.valid)
break;
tz->trips.active[i].flags.enabled = 1;
--
2.33.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI: thermal: drop an always true check
2021-11-15 17:32 [PATCH] ACPI: thermal: drop an always true check Adam Borowski
@ 2021-11-16 19:33 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-11-16 19:33 UTC (permalink / raw)
To: Adam Borowski
Cc: Rafael J. Wysocki, Zhang Rui, Len Brown, ACPI Devel Maling List
On Mon, Nov 15, 2021 at 6:55 PM Adam Borowski <kilobyte@angband.pl> wrote:
>
> Address of a field inside a struct can't possibly be null; gcc-12 warns
> about this.
>
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> ---
> drivers/acpi/thermal.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
> index 95105db642b9..155bbabcc6f5 100644
> --- a/drivers/acpi/thermal.c
> +++ b/drivers/acpi/thermal.c
> @@ -1098,8 +1098,6 @@ static int acpi_thermal_resume(struct device *dev)
> return -EINVAL;
>
> for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
> - if (!(&tz->trips.active[i]))
> - break;
> if (!tz->trips.active[i].flags.valid)
> break;
> tz->trips.active[i].flags.enabled = 1;
> --
Applied as 5.16-rc material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-16 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 17:32 [PATCH] ACPI: thermal: drop an always true check Adam Borowski
2021-11-16 19:33 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.