[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb0531b0-ca1c-47db-be84-9009604c51a4@roeck-us.net>
Date: Thu, 9 Jan 2025 12:44:35 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Huisong Li <lihuisong@...wei.com>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
jdelvare@...e.com, liuyonglong@...wei.com, zhanjie9@...ilicon.com,
zhenglifeng1@...wei.com
Subject: Re: [PATCH v3 1/2] hwmon: (acpi_power_meter) Fix uninitialized
variables
On Thu, Jan 09, 2025 at 04:17:07PM +0800, Huisong Li wrote:
> The 'power1_alarm' attribute uses the 'power' and 'cap' in the
> acpi_power_meter_resource structure. Currently, these two fields are just
> updated when user query 'power' and 'cap' attribute. If user directly query
> the 'power1_alarm' attribute without queryng above two attributes, driver
> will use uninitialized variables to judge.
>
> So this patch adds the setting of alarm state and update 'cap' in the
> notification callback and update 'power' and 'cap' if needed to show the
> real alarm state.
>
> Signed-off-by: Huisong Li <lihuisong@...wei.com>
Applied.
Thanks,
Guenter
Powered by blists - more mailing lists