[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR10MB235286F9A7E4E1C32DD41139FE2E0@VI1PR10MB2352.EURPRD10.PROD.OUTLOOK.COM>
Date: Wed, 10 Apr 2019 12:50:53 +0000
From: Steve Twiss <stwiss.opensource@...semi.com>
To: Guenter Roeck <linux@...ck-us.net>,
Wim Van Sebroeck <wim@...ux-watchdog.org>
CC: "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Support Opensource <Support.Opensource@...semi.com>
Subject: RE: [PATCH 12/22] watchdog: da9063_wdt: Use 'dev' instead of
dereferencing it repeatedly
Hi Guenter,
On 08 April 2019 20:39, Guenter Roeck:
> Subject: [PATCH 12/22] watchdog: da9063_wdt: Use 'dev' instead of
> dereferencing it repeatedly
>
> Introduce local variable 'struct device *dev' and use it instead of
> dereferencing it repeatedly.
>
> The conversion was done automatically with coccinelle using the
> following semantic patches. The semantic patches and the scripts
> used to generate this commit log are available at
> https://github.com/groeck/coccinelle-patches
>
> Cc: Support Opensource <support.opensource@...semi.com>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
> drivers/watchdog/da9063_wdt.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
> index 384dca16af8b..06eb9070203c 100644
> --- a/drivers/watchdog/da9063_wdt.c
> +++ b/drivers/watchdog/da9063_wdt.c
> @@ -188,17 +188,18 @@ static const struct watchdog_ops
> da9063_watchdog_ops = {
>
> static int da9063_wdt_probe(struct platform_device *pdev)
> {
> + struct device *dev = &pdev->dev;
> struct da9063 *da9063;
> struct watchdog_device *wdd;
>
> - if (!pdev->dev.parent)
> + if (!dev->parent)
> return -EINVAL;
None of my previous Acked e-mails in this patch set considered whether the
dev->parent was NULL. But this DA9063 driver does.
Logically, this is correct to check, but ... any thoughts?
Otherwise,
Acked-by: Steve Twiss <stwiss.opensource@...semi.com>
Regards,
Steve
Powered by blists - more mailing lists