lkml.org 
[lkml]   [2022]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PULL REQUEST] i2c-for-5.20-part2


On Sun, 14 Aug 2022, Wolfram Sang wrote:

> On Sun, Aug 14, 2022 at 02:33:40AM +0200, Wolfram Sang wrote:
> >
> > > (b) auto-convert (with a coccinelle script) all the 'strlcpy()' users
> > > that don't care about the return value, and leave a few broken users
> > > of strlcpy around
> > >
> > > I think (b) is the simpler thing, but I have no idea how to write a
> > > coccinelle patch that basically does "if return value of strlcpy is
> > > not used, convert the strlcpy to a strscpy".
> >
> > That shouldn't be hard. I'll give it a try tomorrow.
>
> So, I tried right away and it was really as easy as expected:
>
> ===
> @@
> @@
> - strlcpy
> + strscpy
> (...);
> ===
>
> The ';' at the end ensures that spatch only looks for complete
> statements not containing anything more than expressed.

This is correct.

julia

>
> I pushed out a branch for the testbots now:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/strlcpy
>
> Patch granularity might not be perfect currently, but for testing this
> should do.
>
> All the best,
>
> Wolfram
>
>

\
 
 \ /
  Last update: 2022-08-14 06:32    [W:0.238 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site