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]
Message-ID: <d5f5ac0d-830d-47e7-bb2c-55ecea7eddd2@roeck-us.net>
Date: Mon, 19 May 2025 08:44:19 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Alexandru Soponar <asoponar@...adin.ro>, linux-kernel@...r.kernel.org,
 linux-hwmon@...r.kernel.org, linux-iio@...r.kernel.org,
 linux-leds@...r.kernel.org, linux-watchdog@...r.kernel.org
Cc: jdelvare@...e.com, jic23@...nel.org, pavel@....cz, lee@...nel.org,
 baocheng.su@...mens.com, wim@...ux-watchdog.org,
 tobias.schaffner@...mens.com, angelogioacchino.delregno@...labora.com,
 benedikt.niedermayr@...mens.com, matthias.bgg@...il.com,
 aardelean@...libre.com, contact@...y.one
Subject: Re: [PATCH 0/16] lib: Refactor find_closest() and
 find_closest_descending() from macros to lib functions

On 5/15/25 01:13, Alexandru Soponar wrote:
> This patch series converts the find_closest() and find_closest_descending() macros
> into proper library functions. The conversion moves these utilities from macro
> implementations in util_macros.h to standard C functions in lib/find_closest.c.
> 
> The first 15 patches modify individual callers across hwmon, iio, leds, regulator,
> and watchdog subsystems to ensure they work correctly with the new function-based
> implementation. This maintains compatibility while allowing the final conversion.
> 
> The final patch implements the actual refactoring by moving the code to
> lib/find_closest.c. This approach was chosen based on discussions between
> Andrew Morton and Alexandru Ardelean[1], who suggested that a non-inline
> implementation would be appropriate given the size of the functions.
> 
> The refactoring avoids of macro expansion-related issues and proper function
> prototypes with well-defined parameter types.
> 
> Links:
> [1] https://lore.kernel.org/lkml/20241105145406.554365-1-aardelean@baylibre.com/
> 
> Alexandru Soponar (16):
>    hwmon: w83795: Fix type incompatibility with non-macro find_closest
>    hwmon: emc1403: Fix type incompatibility with non-macro find_closest
>    hwmon: ina3221: Fix type incompatibility with non-macro find_closest
>    hwmon: lm95234: Fix type incompatibility with non-macro find_closest
>    hwmon: max1619: Fix type incompatibility with non-macro find_closest
>    hwmon: lm75: Fix type incompatibility with non-macro find_closest
>    hwmon: ltc4282: Fix type incompatibility with non-macro find_closest
>    hwmon: max6639: Fix type incompatibility with non-macro find_closest
>    hwmon: max20740: Fix type incompatibility with non-macro find_closest
>    iio: ad7606: Fix type incompatibility with non-macro find_closest
>    iio: mcp3564: Fix type incompatibility with non-macro find_closest
>    iio: max44009: Fix type incompatibility with non-macro find_closest
>    leds: eds-mt6370-rgb: Fix type incompatibility with find_closest()
>    regulator: max77857: Fix type incompatibility with find_closest()
>    watchdog: simatic-ipc-wdt: Fix type incompatibility with
>      find_closest()

For the hwmon and watchdog patches:

Acked-by: Guenter Roeck <linux@...ck-us.net>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ