Re: [PATCH] watchdogs: fix several MODULE_PARM_DESC strings

From: Wim Van Sebroeck
Date: Mon May 03 2010 - 04:57:32 EST


Hi Randy,

> Fix MODULE_PARM_DESC() strings in several watchdog drivers.
> Some are simple as add a parenthesis.
> Others are problems from __stringify() being used on a
> variable name instead of a macro name, so the variable name
> is produced in the string instead of its build-time value.
> In these cases, create a macro for the value so that the
> module param description string is useful.
>
> Only pc87413_wdt has been built (due to toolchains).
>
> Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> Cc: Wim Van Sebroeck <wim@xxxxxxxxx>

Adding this one to the linux-2.6-watchdog-next tree.

> BTW, in ep93xx_wdt.c, I can't find where WATCHDOG_TIMEOUT is
> defined. Can someone point me to it, please?
> (or does it not even build?)

I don't think it will build: WDT_TIMEOUT is the correct timeout macro.
I'll sent in a fix for this. Thanks!

> --- lnx-2634-rc6.orig/drivers/watchdog/pc87413_wdt.c
> +++ lnx-2634-rc6/drivers/watchdog/pc87413_wdt.c
> @@ -53,7 +53,9 @@
> #define WDTO 0x11 /* Watchdog timeout register */
> #define WDCFG 0x12 /* Watchdog config register */
>
> -static int io = 0x2E; /* Address used on Portwell Boards */
> +#define IO_DEFAULT 0x2E /* Address used on Portwell Boards */
> +
> +static int io = IO_DEFAULT;
>
> static int timeout = DEFAULT_TIMEOUT; /* timeout value */
> static unsigned long timer_enabled; /* is the timer enabled? */
> @@ -583,12 +585,12 @@ MODULE_LICENSE("GPL");
> MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
>
> module_param(io, int, 0);
> -MODULE_PARM_DESC(io, MODNAME " I/O port (default: " __MODULE_STRING(io) ").");
> +MODULE_PARM_DESC(io, MODNAME " I/O port (default: " __MODULE_STRING(IO_DEFAULT) ").");

This one is changed to:
+MODULE_PARM_DESC(io, MODNAME " I/O port (default: "
+ __MODULE_STRING(IO_DEFAULT) ").");

Kind regards,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/