From: Julia Lawall <julia.lawall@inria.fr>
To: Wolfram Sang <wsa@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Julia Lawall <julia.lawall@inria.fr>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
cocci@systeme.lip6.fr
Subject: Re: [PULL REQUEST] i2c-for-5.20-part2
Date: Sun, 14 Aug 2022 06:30:48 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2208140630320.3190@hadrien> (raw)
In-Reply-To: <YvhXzarjOLEJ8nsW@shikoro>
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
>
>
next prev parent reply other threads:[~2022-08-14 4:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-13 15:42 [PULL REQUEST] i2c-for-5.20-part2 Wolfram Sang
2022-08-13 21:37 ` Linus Torvalds
2022-08-14 0:33 ` Wolfram Sang
2022-08-14 2:02 ` Wolfram Sang
2022-08-14 4:30 ` Julia Lawall [this message]
2022-08-14 7:01 ` Wolfram Sang
2022-08-14 20:34 ` Wolfram Sang
2022-08-13 21:48 ` pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2208140630320.3190@hadrien \
--to=julia.lawall@inria.fr \
--cc=cocci@systeme.lip6.fr \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox