[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <825dad63-4241-4dd2-92fb-c9f95bd2220b@wanadoo.fr>
Date: Sun, 26 Jan 2025 19:13:30 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Ming Yu <a0282524688@...il.com>, tmyu0@...oton.com, lee@...nel.org,
linus.walleij@...aro.org, brgl@...ev.pl, andi.shyti@...nel.org,
mkl@...gutronix.de, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
wim@...ux-watchdog.org, linux@...ck-us.net, jdelvare@...e.com,
alexandre.belloni@...tlin.com
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-i2c@...r.kernel.org, linux-can@...r.kernel.org,
netdev@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-hwmon@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: Re: [PATCH v6 5/7] watchdog: Add Nuvoton NCT6694 WDT support
On 23/01/2025 at 18:11, Ming Yu wrote:
> This driver supports Watchdog timer functionality for NCT6694 MFD
> device based on USB interface.
>
> Signed-off-by: Ming Yu <a0282524688@...il.com>
> ---
(...)
> +static int nct6694_wdt_set_timeout(struct watchdog_device *wdev,
> + unsigned int timeout)
> +{
> + int ret;
> +
> + ret = nct6694_wdt_setting(wdev, timeout, NCT6694_ACTION_GPO,
> + wdev->pretimeout, NCT6694_ACTION_GPO);
> + if (ret)
> + return ret;
> +
> + wdev->timeout = timeout;
> +
> + return 0;
> +}
Not critical but I would rather like you to fix this shadow warning:
drivers/watchdog/nct6694_wdt.c: In function 'nct6694_wdt_set_timeout':
drivers/watchdog/nct6694_wdt.c:168:49: warning: declaration of
'timeout' shadows a global declaration [-Wshadow]
168 | unsigned int timeout)
| ~~~~~~~~~~~~~^~~~~~~
drivers/watchdog/nct6694_wdt.c:36:21: note: shadowed declaration is here
36 | static unsigned int timeout = NCT6694_DEFAULT_TIMEOUT;
| ^~~~~~~
> +static int nct6694_wdt_set_pretimeout(struct watchdog_device *wdev,
> + unsigned int pretimeout)
> +{
> + int ret;
> +
> + ret = nct6694_wdt_setting(wdev, wdev->timeout, NCT6694_ACTION_GPO,
> + pretimeout, NCT6694_ACTION_GPO);
> + if (ret)
> + return ret;
> +
> + wdev->pretimeout = pretimeout;
> +
> + return 0;
> +}
Idem:
drivers/watchdog/nct6694_wdt.c: In function 'nct6694_wdt_set_pretimeout':
drivers/watchdog/nct6694_wdt.c:183:52: warning: declaration of
'pretimeout' shadows a global declaration [-Wshadow]
183 | unsigned int pretimeout)
| ~~~~~~~~~~~~~^~~~~~~~~~
drivers/watchdog/nct6694_wdt.c:40:21: note: shadowed declaration is here
40 | static unsigned int pretimeout = NCT6694_DEFAULT_PRETIMEOUT;
| ^~~~~~~~~~
(...)
Yours sincerely,
Vincent Mailhol
Powered by blists - more mailing lists