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] [day] [month] [year] [list]
Message-ID: <ffef93ae-177e-4c7c-8e13-630180ad11d3@roeck-us.net>
Date: Wed, 19 Mar 2025 15:44:49 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Huisong Li <lihuisong@...wei.com>
Cc: jdelvare@...e.com, linux-hwmon@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jonathan.Cameron@...wei.com,
	zhanjie9@...ilicon.com, zhenglifeng1@...wei.com,
	liuyonglong@...wei.com
Subject: Re: [PATCH v3] hwmon: (acpi_power_meter) Replace the deprecated
 hwmon_device_register

On Wed, Mar 19, 2025 at 10:06:38AM +0800, Huisong Li wrote:
> When load this mode, we can see the following log:
> "power_meter ACPI000D:00: hwmon_device_register() is deprecated. Please
>  convert the driver to use hwmon_device_register_with_info()."
> 
> So replace hwmon_device_register with hwmon_device_register_with_info.
> 
> These attributes, 'power_accuracy', 'power_cap_hyst', 'power_average_min'
> and 'power_average_max', should have been placed in hwmon_chip_info as
> power data type. But these attributes are displayed as string format on
> the following case:
> a) power1_accuracy  --> display like '90.0%'
> b) power1_cap_hyst  --> display 'unknown' when its value is 0xFFFFFFFF
> c) power1_average_min/max --> display 'unknown' when its value is
> 			      negative.
> To avoid any changes in the display of these sysfs interfaces, we can't
> modifiy the type of these attributes in hwmon core and have to put them
> to extra_groups.
> 
> Please note that the path of these sysfs interfaces are modified
> accordingly if use hwmon_device_register_with_info():
> old: all sysfs interfaces are under acpi device, namely,
>      /sys/class/hwmon/hwmonX/device/
> now: all sysfs interfaces are under hwmon device, namely,
>      /sys/class/hwmon/hwmonX/
> The new ABI does not guarantee that the underlying path remains the same.
> But we have to accept this change so as to replace the deprecated API.
> Fortunately, some userspace application, like libsensors, would scan
> the two path and handles this automatically. So we can accept this change
> so as to drop the deprecated message.
> 
> Signed-off-by: Huisong Li <lihuisong@...wei.com>

Applied.

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ