Thread (19 messages) 19 messages, 5 authors, 2025-02-06

Re: [PATCH v6 5/7] watchdog: Add Nuvoton NCT6694 WDT support

From: Ming Yu <hidden>
Date: 2025-02-04 02:44:23
Also in: linux-can, linux-gpio, linux-hwmon, linux-i2c, linux-rtc, linux-usb, linux-watchdog, lkml

Dear Vincent,

Thank you for reviewing,
I will make the change in the next patch.


Best regards,
Ming


Vincent Mailhol [off-list ref] 於 2025年1月26日 週日 下午6:13寫道:
On 23/01/2025 at 18:11, Ming Yu wrote:
quoted
This driver supports Watchdog timer functionality for NCT6694 MFD
device based on USB interface.

Signed-off-by: Ming Yu <redacted>
---
(...)
quoted
+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;
        |                     ^~~~~~~
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help