RE: [PATCH v2 1/3] hwmon: Replace __MODULE_STRING() with __stringify()

From: Loktionov, Aleksandr

Date: Fri Oct 02 2026 - 10:05:14 EST




> -----Original Message-----
> From: Petr Pavlu <petr.pavlu@xxxxxxxx>
> Sent: Friday, October 2, 2026 10:31 AM
> To: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>; Guenter Roeck
> <linux@xxxxxxxxxxxx>; Ian Abbott <abbotti@xxxxxxxxx>; H Hartley
> Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>; Maarten Lankhorst
> <maarten.lankhorst@xxxxxxxxxxxxxxx>; Maxime Ripard
> <mripard@xxxxxxxxxx>; Thomas Zimmermann <tzimmermann@xxxxxxx>; David
> Airlie <airlied@xxxxxxxxx>; Simona Vetter <simona@xxxxxxxx>; Rudolf
> Marek <r.marek@xxxxxxxxxxxx>; Andi Shyti <andi.shyti@xxxxxxxxxx>;
> Chris Snook <chris.snook@xxxxxxxxx>; Andrew Lunn
> <andrew+netdev@xxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric
> Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo
> Abeni <pabeni@xxxxxxxxxx>; Nguyen, Anthony L
> <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@xxxxxxxxx>; Marek Behún <kabel@xxxxxxxxxx>;
> Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>; Andreas Noever
> <andreas.noever@xxxxxxxxx>; Mika Westerberg <westeri@xxxxxxxxxx>;
> Yehezkel Bernat <YehezkelShB@xxxxxxxxx>; Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx>; Jiri Slaby <jirislaby@xxxxxxxxxx>;
> Duncan Sands <duncan.sands@xxxxxxx>; Chas Williams <3chas3@xxxxxxxxx>;
> Luis Chamberlain <mcgrof@xxxxxxxxxx>; Petr Pavlu
> <petr.pavlu@xxxxxxxx>; Daniel Gomez <da.gomez@xxxxxxxxxx>; Sami
> Tolvanen <samitolvanen@xxxxxxxxxx>; Aaron Tomlin <atomlin@xxxxxxxxxxx>
> Cc: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>; linux-
> watchdog@xxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-
> hwmon@xxxxxxxxxxxxxxx; linux-i2c@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; intel-wired-lan@xxxxxxxxxxxxxxxx; linux-
> rtc@xxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; linux-
> serial@xxxxxxxxxxxxxxx; linux-atm-general@xxxxxxxxxxxxxxxxxxxxx;
> linux-modules@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH v2 1/3] hwmon: Replace __MODULE_STRING() with
> __stringify()
>
> __MODULE_STRING() has been an alias for __stringify() since "[PATCH]
> MODULE_PARM support for older modules" [1] in 2002-12. That change
> also moved it to the graveyard section at the end of linux/module.h
>
> Replace the remaining uses of __MODULE_STRING() with __stringify() in
> preparation for its removal.
>
> Link: https://git.kernel.org/tglx/history/c/136839a1b4 [1]
> Signed-off-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
> ---
> drivers/hwmon/fschmd.c | 3 ++-
> drivers/hwmon/nct7904.c | 5 +++--
> drivers/hwmon/sch56xx-common.c | 3 ++-
> drivers/hwmon/w83793.c | 5 +++--
> 4 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c index
> 019fc32bf318..df9418a86c83 100644
> --- a/drivers/hwmon/fschmd.c
> +++ b/drivers/hwmon/fschmd.c
> @@ -35,6 +35,7 @@
> #include <linux/miscdevice.h>
> #include <linux/uaccess.h>
> #include <linux/kref.h>
> +#include <linux/stringify.h>
>
> /* Addresses to scan */
> static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
> @@ -43,7 +44,7 @@ static const unsigned short normal_i2c[] = { 0x73,
> I2C_CLIENT_END }; static bool nowayout = WATCHDOG_NOWAYOUT;
> module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog
> cannot be stopped once started (default="
> - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> + __stringify(WATCHDOG_NOWAYOUT) ")");
>
> enum chips { fscpos, fscher, fscscy, fschrc, fschmd, fschds, fscsyl
> };
>
> diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c index
> 976b8a008e44..04e1a8e6db37 100644
> --- a/drivers/hwmon/nct7904.c
> +++ b/drivers/hwmon/nct7904.c
> @@ -23,6 +23,7 @@
> #include <linux/i2c.h>
> #include <linux/hwmon.h>
> #include <linux/watchdog.h>
> +#include <linux/stringify.h>
>
> #define VENDOR_ID_REG 0x7A /* Any bank */
> #define NUVOTON_ID 0x50
> @@ -113,12 +114,12 @@
> static int timeout;
> module_param(timeout, int, 0);
> MODULE_PARM_DESC(timeout, "Watchdog timeout in minutes. 1 <= timeout
> <= 255, default="
> - __MODULE_STRING(WATCHDOG_TIMEOUT) ".");
> + __stringify(WATCHDOG_TIMEOUT) ".");
>
> static bool nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout,
> bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once
> started (default="
> - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> + __stringify(WATCHDOG_NOWAYOUT) ")");
>
> static const unsigned short normal_i2c[] = {
> 0x2d, 0x2e, I2C_CLIENT_END
> diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-
> common.c index a385aae3bb0f..febb8ba7dc2c 100644
> --- a/drivers/hwmon/sch56xx-common.c
> +++ b/drivers/hwmon/sch56xx-common.c
> @@ -18,13 +18,14 @@
> #include <linux/watchdog.h>
> #include <linux/uaccess.h>
> #include <linux/slab.h>
> +#include <linux/stringify.h>
> #include "sch56xx-common.h"
>
> /* Insmod parameters */
> static bool nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout,
> bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once
> started (default="
> - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> + __stringify(WATCHDOG_NOWAYOUT) ")");
>
> #define SIO_SCH56XX_LD_EM 0x0C /* Embedded uController Logical Dev
> */
> #define SIO_UNLOCK_KEY 0x55 /* Key to enable Super-I/O */
> diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index
> c6ef04c69856..e1f2708b5db6 100644
> --- a/drivers/hwmon/w83793.c
> +++ b/drivers/hwmon/w83793.c
> @@ -34,6 +34,7 @@
> #include <linux/notifier.h>
> #include <linux/reboot.h>
> #include <linux/jiffies.h>
> +#include <linux/stringify.h>
>
> /* Default values */
> #define WATCHDOG_TIMEOUT 2 /* 2 minute default timeout */
> @@ -57,13 +58,13 @@ static int timeout = WATCHDOG_TIMEOUT; /*
> default timeout in minutes */
> module_param(timeout, int, 0);
> MODULE_PARM_DESC(timeout,
> "Watchdog timeout in minutes. 2<= timeout <=255 (default="
> - __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
> + __stringify(WATCHDOG_TIMEOUT) ")");
>
> static bool nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout,
> bool, 0); MODULE_PARM_DESC(nowayout,
> "Watchdog cannot be stopped once started (default="
> - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> + __stringify(WATCHDOG_NOWAYOUT) ")");
>
> /*
> * Address 0x00, 0x0d, 0x0e, 0x0f in all three banks are reserved
>
> --
> 2.55.0

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>