lkml.org 
[lkml]   [2019]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH 12/22] watchdog: da9063_wdt: Use 'dev' instead of dereferencing it repeatedly
    Date
    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@diasemi.com>
    > Signed-off-by: Guenter Roeck <linux@roeck-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@diasemi.com>

    Regards,
    Steve

    \
     
     \ /
      Last update: 2019-04-10 14:51    [W:4.075 / U:0.192 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site