* [patch] watchdog: pnx833x_wdt: fix typo in MODULE_PARM_DESC
@ 2016-01-08 11:02 Dan Carpenter
2016-01-08 14:49 ` Guenter Roeck
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2016-01-08 11:02 UTC (permalink / raw)
To: Wim Van Sebroeck
Cc: Guenter Roeck, linux-watchdog, linux-kernel, kernel-janitors
The module_param() is "pnx833x_wdt_timeout" and MODULE_PARM_DESC()
should match.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/watchdog/pnx833x_wdt.c b/drivers/watchdog/pnx833x_wdt.c
index 882fdcb..69da25a 100644
--- a/drivers/watchdog/pnx833x_wdt.c
+++ b/drivers/watchdog/pnx833x_wdt.c
@@ -52,8 +52,9 @@ static int pnx833x_wdt_alive;
/* Set default timeout in MHZ.*/
static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT;
module_param(pnx833x_wdt_timeout, int, 0);
-MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), default="
- __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
+MODULE_PARM_DESC(pnx833x_wdt_timeout,
+ "Watchdog timeout in Mhz. (68Mhz clock), default="
+ __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] watchdog: pnx833x_wdt: fix typo in MODULE_PARM_DESC
2016-01-08 11:02 [patch] watchdog: pnx833x_wdt: fix typo in MODULE_PARM_DESC Dan Carpenter
@ 2016-01-08 14:49 ` Guenter Roeck
2016-01-11 21:42 ` Wim Van Sebroeck
2016-03-06 20:33 ` Wim Van Sebroeck
0 siblings, 2 replies; 4+ messages in thread
From: Guenter Roeck @ 2016-01-08 14:49 UTC (permalink / raw)
To: Dan Carpenter, Wim Van Sebroeck
Cc: linux-watchdog, linux-kernel, kernel-janitors
On 01/08/2016 03:02 AM, Dan Carpenter wrote:
> The module_param() is "pnx833x_wdt_timeout" and MODULE_PARM_DESC()
> should match.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/watchdog/pnx833x_wdt.c b/drivers/watchdog/pnx833x_wdt.c
> index 882fdcb..69da25a 100644
> --- a/drivers/watchdog/pnx833x_wdt.c
> +++ b/drivers/watchdog/pnx833x_wdt.c
> @@ -52,8 +52,9 @@ static int pnx833x_wdt_alive;
> /* Set default timeout in MHZ.*/
> static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT;
> module_param(pnx833x_wdt_timeout, int, 0);
> -MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), default="
> - __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
> +MODULE_PARM_DESC(pnx833x_wdt_timeout,
> + "Watchdog timeout in Mhz. (68Mhz clock), default="
> + __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
The intent here was to have a module parameter named 'timeout'.
Of course that was never the case. Wonder if anyone ever noticed.
The correct fix would be to use something like
module_param_named(timeout, pnx833x_wdt_timeout, int, 0);
but of course that would change the ABI. On the other side,
'timeout' is the documented module parameter in
Documentation/watchdog/watchdog-parameters.txt, so one could argue
that using module_param_named() would be a bug fix and not an ABI change.
Not really sure what the best approach is here. Wim, any comments ?
Provide module_param_named() in _addition_ to the existing module_param(),
maybe, if that is possible ?
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] watchdog: pnx833x_wdt: fix typo in MODULE_PARM_DESC
2016-01-08 14:49 ` Guenter Roeck
@ 2016-01-11 21:42 ` Wim Van Sebroeck
2016-03-06 20:33 ` Wim Van Sebroeck
1 sibling, 0 replies; 4+ messages in thread
From: Wim Van Sebroeck @ 2016-01-11 21:42 UTC (permalink / raw)
To: Guenter Roeck
Cc: Dan Carpenter, linux-watchdog, linux-kernel, kernel-janitors
Hi All,
> On 01/08/2016 03:02 AM, Dan Carpenter wrote:
> >The module_param() is "pnx833x_wdt_timeout" and MODULE_PARM_DESC()
> >should match.
> >
> >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> >diff --git a/drivers/watchdog/pnx833x_wdt.c
> >b/drivers/watchdog/pnx833x_wdt.c
> >index 882fdcb..69da25a 100644
> >--- a/drivers/watchdog/pnx833x_wdt.c
> >+++ b/drivers/watchdog/pnx833x_wdt.c
> >@@ -52,8 +52,9 @@ static int pnx833x_wdt_alive;
> > /* Set default timeout in MHZ.*/
> > static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT;
> > module_param(pnx833x_wdt_timeout, int, 0);
> >-MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock),
> >default="
> >- __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
> >+MODULE_PARM_DESC(pnx833x_wdt_timeout,
> >+ "Watchdog timeout in Mhz. (68Mhz clock), default="
> >+ __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
>
> The intent here was to have a module parameter named 'timeout'.
> Of course that was never the case. Wonder if anyone ever noticed.
> The correct fix would be to use something like
> module_param_named(timeout, pnx833x_wdt_timeout, int, 0);
> but of course that would change the ABI. On the other side,
> 'timeout' is the documented module parameter in
> Documentation/watchdog/watchdog-parameters.txt, so one could argue
> that using module_param_named() would be a bug fix and not an ABI change.
>
> Not really sure what the best approach is here. Wim, any comments ?
> Provide module_param_named() in _addition_ to the existing module_param(),
> maybe, if that is possible ?
Good question. If timeout would have been a timeout in seconds then I would
have said to go for module_param_named(). But since it is a value in Mhz, I
would rather go for Dan's patch. It will break the parameters for everyone
that has set in manually, but I personnaly think that people are using the
default value or change it via the watchdog daemon.
But if we change this, we should also make sure that
Documentation/watchdog/watchdog-parameters.txt gets corrected.
Kind regards,
Wim.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] watchdog: pnx833x_wdt: fix typo in MODULE_PARM_DESC
2016-01-08 14:49 ` Guenter Roeck
2016-01-11 21:42 ` Wim Van Sebroeck
@ 2016-03-06 20:33 ` Wim Van Sebroeck
1 sibling, 0 replies; 4+ messages in thread
From: Wim Van Sebroeck @ 2016-03-06 20:33 UTC (permalink / raw)
To: Guenter Roeck
Cc: Dan Carpenter, linux-watchdog, linux-kernel, kernel-janitors
Hi all,
> On 01/08/2016 03:02 AM, Dan Carpenter wrote:
> >The module_param() is "pnx833x_wdt_timeout" and MODULE_PARM_DESC()
> >should match.
> >
> >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> >diff --git a/drivers/watchdog/pnx833x_wdt.c
> >b/drivers/watchdog/pnx833x_wdt.c
> >index 882fdcb..69da25a 100644
> >--- a/drivers/watchdog/pnx833x_wdt.c
> >+++ b/drivers/watchdog/pnx833x_wdt.c
> >@@ -52,8 +52,9 @@ static int pnx833x_wdt_alive;
> > /* Set default timeout in MHZ.*/
> > static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT;
> > module_param(pnx833x_wdt_timeout, int, 0);
> >-MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock),
> >default="
> >- __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
> >+MODULE_PARM_DESC(pnx833x_wdt_timeout,
> >+ "Watchdog timeout in Mhz. (68Mhz clock), default="
> >+ __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
>
> The intent here was to have a module parameter named 'timeout'.
> Of course that was never the case. Wonder if anyone ever noticed.
> The correct fix would be to use something like
> module_param_named(timeout, pnx833x_wdt_timeout, int, 0);
> but of course that would change the ABI. On the other side,
> 'timeout' is the documented module parameter in
> Documentation/watchdog/watchdog-parameters.txt, so one could argue
> that using module_param_named() would be a bug fix and not an ABI change.
>
> Not really sure what the best approach is here. Wim, any comments ?
> Provide module_param_named() in _addition_ to the existing module_param(),
> maybe, if that is possible ?
>
I would keep the userspace variable the same.
So keep: MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock),
and fix the internal variables...
That will give us no userspace changes and no additional fixes.
Kind regards,
Wim.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-06 20:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-08 11:02 [patch] watchdog: pnx833x_wdt: fix typo in MODULE_PARM_DESC Dan Carpenter
2016-01-08 14:49 ` Guenter Roeck
2016-01-11 21:42 ` Wim Van Sebroeck
2016-03-06 20:33 ` Wim Van Sebroeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).