Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable()
@ 2019-11-20 14:09 Fabio Estevam
  2019-11-20 15:44 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2019-11-20 14:09 UTC (permalink / raw)
  To: linux; +Cc: wim, linux-imx, linux-watchdog, Fabio Estevam

Since commit 747d88a1a88c1b ("watchdog: imx7ulp: Pass the wdog instance in
imx7ulp_wdt_enable()") imx7ulp_wdt_enable() accepts a watchdog_device
structure, so fix one instance that missed such conversion.

This also fixes the following sparse warning:

drivers/watchdog/imx7ulp_wdt.c:115:31: warning: incorrect type in argument 1 (different address spaces)
drivers/watchdog/imx7ulp_wdt.c:115:31:    expected struct watchdog_device *wdog
drivers/watchdog/imx7ulp_wdt.c:115:31:    got void [noderef] <asn:2>*base

Fixes: 747d88a1a88c1 ("watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable()")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/watchdog/imx7ulp_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
index 0a87c6f4bab2..11b9e7c6b7f5 100644
--- a/drivers/watchdog/imx7ulp_wdt.c
+++ b/drivers/watchdog/imx7ulp_wdt.c
@@ -112,7 +112,7 @@ static int imx7ulp_wdt_restart(struct watchdog_device *wdog,
 {
 	struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog);
 
-	imx7ulp_wdt_enable(wdt->base, true);
+	imx7ulp_wdt_enable(wdog, true);
 	imx7ulp_wdt_set_timeout(&wdt->wdd, 1);
 
 	/* wait for wdog to fire */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable()
  2019-11-20 14:09 [PATCH] watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable() Fabio Estevam
@ 2019-11-20 15:44 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2019-11-20 15:44 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: wim, linux-imx, linux-watchdog

On 11/20/19 6:09 AM, Fabio Estevam wrote:
> Since commit 747d88a1a88c1b ("watchdog: imx7ulp: Pass the wdog instance in
> imx7ulp_wdt_enable()") imx7ulp_wdt_enable() accepts a watchdog_device
> structure, so fix one instance that missed such conversion.
> 
> This also fixes the following sparse warning:
> 
> drivers/watchdog/imx7ulp_wdt.c:115:31: warning: incorrect type in argument 1 (different address spaces)
> drivers/watchdog/imx7ulp_wdt.c:115:31:    expected struct watchdog_device *wdog
> drivers/watchdog/imx7ulp_wdt.c:115:31:    got void [noderef] <asn:2>*base
> 
> Fixes: 747d88a1a88c1 ("watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable()")
> Signed-off-by: Fabio Estevam <festevam@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/imx7ulp_wdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
> index 0a87c6f4bab2..11b9e7c6b7f5 100644
> --- a/drivers/watchdog/imx7ulp_wdt.c
> +++ b/drivers/watchdog/imx7ulp_wdt.c
> @@ -112,7 +112,7 @@ static int imx7ulp_wdt_restart(struct watchdog_device *wdog,
>   {
>   	struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog);
>   
> -	imx7ulp_wdt_enable(wdt->base, true);
> +	imx7ulp_wdt_enable(wdog, true);
>   	imx7ulp_wdt_set_timeout(&wdt->wdd, 1);
>   
>   	/* wait for wdog to fire */
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 14:09 [PATCH] watchdog: imx7ulp: Fix missing conversion of imx7ulp_wdt_enable() Fabio Estevam
2019-11-20 15:44 ` Guenter Roeck

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git