* [PATCH -next] watchdog: wdat_wdt: Fix warning for using 0 as NULL
@ 2016-09-28 14:44 Wei Yongjun
2016-09-28 14:50 ` Mika Westerberg
2016-09-28 15:51 ` Guenter Roeck
0 siblings, 2 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-09-28 14:44 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Mika Westerberg, Rafael J. Wysocki
Cc: Wei Yongjun, linux-watchdog
From: Wei Yongjun <weiyongjun1@huawei.com>
Fixes the following sparse warnings:
drivers/watchdog/wdat_wdt.c:210:66: warning: Using plain integer as NULL pointer
drivers/watchdog/wdat_wdt.c:235:66: warning: Using plain integer as NULL pointer
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/watchdog/wdat_wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
index 6b64645..7ab923f 100644
--- a/drivers/watchdog/wdat_wdt.c
+++ b/drivers/watchdog/wdat_wdt.c
@@ -207,7 +207,7 @@ static int wdat_wdt_enable_reboot(struct wdat_wdt *wdat)
* recommeded to make it configurable through hardware register. We
* enable reboot now if it is configrable, just in case.
*/
- ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_REBOOT, 0, 0);
+ ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_REBOOT, 0, NULL);
if (ret && ret != -EOPNOTSUPP) {
dev_err(&wdat->pdev->dev,
"Failed to enable reboot when watchdog triggers\n");
@@ -232,7 +232,7 @@ static void wdat_wdt_boot_status(struct wdat_wdt *wdat)
wdat->wdd.bootstatus = WDIOF_CARDRESET;
/* Clear the boot status in case BIOS did not do it */
- ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_STATUS, 0, 0);
+ ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_STATUS, 0, NULL);
if (ret && ret != -EOPNOTSUPP)
dev_err(&wdat->pdev->dev, "Failed to clear boot status\n");
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] watchdog: wdat_wdt: Fix warning for using 0 as NULL
2016-09-28 14:44 [PATCH -next] watchdog: wdat_wdt: Fix warning for using 0 as NULL Wei Yongjun
@ 2016-09-28 14:50 ` Mika Westerberg
2016-09-28 21:51 ` Rafael J. Wysocki
2016-09-28 15:51 ` Guenter Roeck
1 sibling, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2016-09-28 14:50 UTC (permalink / raw)
To: Wei Yongjun
Cc: Wim Van Sebroeck, Guenter Roeck, Rafael J. Wysocki, Wei Yongjun,
linux-watchdog
On Wed, Sep 28, 2016 at 02:44:55PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fixes the following sparse warnings:
>
> drivers/watchdog/wdat_wdt.c:210:66: warning: Using plain integer as NULL pointer
> drivers/watchdog/wdat_wdt.c:235:66: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Good catch!
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
(I should run sparse more often).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] watchdog: wdat_wdt: Fix warning for using 0 as NULL
2016-09-28 14:44 [PATCH -next] watchdog: wdat_wdt: Fix warning for using 0 as NULL Wei Yongjun
2016-09-28 14:50 ` Mika Westerberg
@ 2016-09-28 15:51 ` Guenter Roeck
1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2016-09-28 15:51 UTC (permalink / raw)
To: Wei Yongjun
Cc: Wim Van Sebroeck, Mika Westerberg, Rafael J. Wysocki,
Wei Yongjun, linux-watchdog
On Wed, Sep 28, 2016 at 02:44:55PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fixes the following sparse warnings:
>
> drivers/watchdog/wdat_wdt.c:210:66: warning: Using plain integer as NULL pointer
> drivers/watchdog/wdat_wdt.c:235:66: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/wdat_wdt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
> index 6b64645..7ab923f 100644
> --- a/drivers/watchdog/wdat_wdt.c
> +++ b/drivers/watchdog/wdat_wdt.c
> @@ -207,7 +207,7 @@ static int wdat_wdt_enable_reboot(struct wdat_wdt *wdat)
> * recommeded to make it configurable through hardware register. We
> * enable reboot now if it is configrable, just in case.
> */
> - ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_REBOOT, 0, 0);
> + ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_REBOOT, 0, NULL);
> if (ret && ret != -EOPNOTSUPP) {
> dev_err(&wdat->pdev->dev,
> "Failed to enable reboot when watchdog triggers\n");
> @@ -232,7 +232,7 @@ static void wdat_wdt_boot_status(struct wdat_wdt *wdat)
> wdat->wdd.bootstatus = WDIOF_CARDRESET;
>
> /* Clear the boot status in case BIOS did not do it */
> - ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_STATUS, 0, 0);
> + ret = wdat_wdt_run_action(wdat, ACPI_WDAT_SET_STATUS, 0, NULL);
> if (ret && ret != -EOPNOTSUPP)
> dev_err(&wdat->pdev->dev, "Failed to clear boot status\n");
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] watchdog: wdat_wdt: Fix warning for using 0 as NULL
2016-09-28 14:50 ` Mika Westerberg
@ 2016-09-28 21:51 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2016-09-28 21:51 UTC (permalink / raw)
To: Mika Westerberg, Wei Yongjun
Cc: Wim Van Sebroeck, Guenter Roeck, Wei Yongjun, linux-watchdog
On 9/28/2016 4:50 PM, Mika Westerberg wrote:
> On Wed, Sep 28, 2016 at 02:44:55PM +0000, Wei Yongjun wrote:
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>> Fixes the following sparse warnings:
>>
>> drivers/watchdog/wdat_wdt.c:210:66: warning: Using plain integer as NULL pointer
>> drivers/watchdog/wdat_wdt.c:235:66: warning: Using plain integer as NULL pointer
>>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Good catch!
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> (I should run sparse more often).
Applied (with tags).
Thanks,
Rafael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-28 21:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 14:44 [PATCH -next] watchdog: wdat_wdt: Fix warning for using 0 as NULL Wei Yongjun
2016-09-28 14:50 ` Mika Westerberg
2016-09-28 21:51 ` Rafael J. Wysocki
2016-09-28 15:51 ` Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.