[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e76117d45b1b1caff6bce8d28506e683694d6a79.camel@perches.com>
Date: Wed, 10 Apr 2019 11:46:24 -0700
From: Joe Perches <joe@...ches.com>
To: Guenter Roeck <linux@...ck-us.net>,
Wim Van Sebroeck <wim@...ux-watchdog.org>
Cc: linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
Matthias Brugger <matthias.bgg@...il.com>
Subject: Re: [PATCH 18/22] watchdog: mt7621_wdt: Use 'dev' instead of
dereferencing it repeatedly
On Wed, 2019-04-10 at 09:27 -0700, Guenter Roeck wrote:
> 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
Interesting collection. It would be useful to specify which
particular script generated or enabled this patch.
Just scanning briefly, it might have been this one:
https://github.com/groeck/coccinelle-patches/blob/master/common/deref.cocci
But it looks like some manual bit might have been required too.
And trivially:
> diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
[]
> @@ -133,18 +133,19 @@ static struct watchdog_device mt7621_wdt_dev = {
[]
> watchdog_init_timeout(&mt7621_wdt_dev, mt7621_wdt_dev.max_timeout,
> - &pdev->dev);
> + dev);
This could be on one line.
Powered by blists - more mailing lists