linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Auto-conversion of watchdog drivers to use devm functions
@ 2017-01-01 23:53 Guenter Roeck
  2017-01-03 23:55 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2017-01-01 23:53 UTC (permalink / raw)
  To: wim; +Cc: linux-watchdog, linux-kernel

Hi Wim,

With heavy support by Julia Lawall, I created a number of coccinelle scripts
to auto-convert watchdog platform drivers to use devm functions. The result
is quite impressive - many drivers won't even need remove functions anymore
after the conversion.

Question is now how to submit the patches. There are 12 rule files affecting
a total of 62 drivers. Should I submit one patch per driver (62 patches),
one patch per rule (12), or one patch per rule file per driver (183) ?

Also, how should I refer to the rules ? The total number of rule lines
is more than 1,000, which seems to be a bit much for the commit log (even
though not all rules apply to all files).

Thanks,
Guenter

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

* Re: Auto-conversion of watchdog drivers to use devm functions
  2017-01-01 23:53 Auto-conversion of watchdog drivers to use devm functions Guenter Roeck
@ 2017-01-03 23:55 ` Andy Shevchenko
  2017-01-04  0:11   ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2017-01-03 23:55 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: wim, linux-watchdog, linux-kernel

On Mon, Jan 2, 2017 at 1:53 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> Hi Wim,
>
> With heavy support by Julia Lawall, I created a number of coccinelle scripts
> to auto-convert watchdog platform drivers to use devm functions. The result
> is quite impressive - many drivers won't even need remove functions anymore
> after the conversion.
>
> Question is now how to submit the patches. There are 12 rule files affecting
> a total of 62 drivers. Should I submit one patch per driver (62 patches),
> one patch per rule (12), or one patch per rule file per driver (183) ?

One per driver.

> Also, how should I refer to the rules ? The total number of rule lines
> is more than 1,000, which seems to be a bit much for the commit log (even
> though not all rules apply to all files).

No need, perhaps some URL?

-- 
With Best Regards,
Andy Shevchenko

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

* Re: Auto-conversion of watchdog drivers to use devm functions
  2017-01-03 23:55 ` Andy Shevchenko
@ 2017-01-04  0:11   ` Guenter Roeck
  0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2017-01-04  0:11 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: wim, linux-watchdog, linux-kernel

On Wed, Jan 04, 2017 at 01:55:39AM +0200, Andy Shevchenko wrote:
> On Mon, Jan 2, 2017 at 1:53 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> > Hi Wim,
> >
> > With heavy support by Julia Lawall, I created a number of coccinelle scripts
> > to auto-convert watchdog platform drivers to use devm functions. The result
> > is quite impressive - many drivers won't even need remove functions anymore
> > after the conversion.
> >
> > Question is now how to submit the patches. There are 12 rule files affecting
> > a total of 62 drivers. Should I submit one patch per driver (62 patches),
> > one patch per rule (12), or one patch per rule file per driver (183) ?
> 
> One per driver.
> 
> > Also, how should I refer to the rules ? The total number of rule lines
> > is more than 1,000, which seems to be a bit much for the commit log (even
> > though not all rules apply to all files).
> 
> No need, perhaps some URL?
> 
Yes, that is what I ended up doing - I created a repository on github and
pushed the semantic patches as well as the scripts used to generate the
actual patches into it. I am going to reference that repository in the
patches, together with a summary of the changes made.

An interesting exercise is to let the semantic patches run on the entire
kernel. It generates almost 1,500 patches.

Thanks,
Guenter

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

end of thread, other threads:[~2017-01-04  0:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01 23:53 Auto-conversion of watchdog drivers to use devm functions Guenter Roeck
2017-01-03 23:55 ` Andy Shevchenko
2017-01-04  0:11   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).