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

Loktionov, Aleksandr aleksandr.loktionov at intel.com
Fri Oct 2 14:04:39 UTC 2026



> -----Original Message-----
> From: Petr Pavlu <petr.pavlu at suse.com>
> Sent: Friday, October 2, 2026 10:31 AM
> To: Wim Van Sebroeck <wim at linux-watchdog.org>; Guenter Roeck
> <linux at roeck-us.net>; Ian Abbott <abbotti at mev.co.uk>; H Hartley
> Sweeten <hsweeten at visionengravers.com>; Maarten Lankhorst
> <maarten.lankhorst at linux.intel.com>; Maxime Ripard
> <mripard at kernel.org>; Thomas Zimmermann <tzimmermann at suse.de>; David
> Airlie <airlied at gmail.com>; Simona Vetter <simona at ffwll.ch>; Rudolf
> Marek <r.marek at assembler.cz>; Andi Shyti <andi.shyti at kernel.org>;
> Chris Snook <chris.snook at gmail.com>; Andrew Lunn
> <andrew+netdev at lunn.ch>; David S. Miller <davem at davemloft.net>; Eric
> Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo
> Abeni <pabeni at redhat.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel at intel.com>; Marek Behún <kabel at kernel.org>;
> Alexandre Belloni <alexandre.belloni at bootlin.com>; Andreas Noever
> <andreas.noever at gmail.com>; Mika Westerberg <westeri at kernel.org>;
> Yehezkel Bernat <YehezkelShB at gmail.com>; Greg Kroah-Hartman
> <gregkh at linuxfoundation.org>; Jiri Slaby <jirislaby at kernel.org>;
> Duncan Sands <duncan.sands at free.fr>; Chas Williams <3chas3 at gmail.com>;
> Luis Chamberlain <mcgrof at kernel.org>; Petr Pavlu
> <petr.pavlu at suse.com>; Daniel Gomez <da.gomez at kernel.org>; Sami
> Tolvanen <samitolvanen at google.com>; Aaron Tomlin <atomlin at atomlin.com>
> Cc: Wolfram Sang <wsa+renesas at sang-engineering.com>; linux-
> watchdog at vger.kernel.org; dri-devel at lists.freedesktop.org; linux-
> hwmon at vger.kernel.org; linux-i2c at vger.kernel.org;
> netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org; linux-
> rtc at vger.kernel.org; linux-usb at vger.kernel.org; linux-
> serial at vger.kernel.org; linux-atm-general at lists.sourceforge.net;
> linux-modules at vger.kernel.org; linux-kernel at vger.kernel.org
> 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 at suse.com>
> ---
>  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 at intel.com>


More information about the Intel-wired-lan mailing list