On Thu, 2017-06-15 at 23:28 +0200, Johannes Berg wrote:
> On Thu, 2017-06-15 at 17:26 -0400, David Miller wrote:
> > 
> > > *skb_put(skb, 1) = 'x';
> > >  
> > > Seems pretty unlikely we have that, and in any case the compiler
> > 
> > would
> > > warn (error?) there if skb_put() becomes void.
> > 
> > Actually I am pretty sure I've seen a pattern like that somewhere. :-
> > )
> 
> Yeah, there are actually a ton of them, and oddly enough my spatch is
> failing to catch _one_ of them?? Still refining it :)

I suggest changing those to skb_put_char(skb, char)
in a first pass and then doing the other bits later.

Here's a script that does the conversion.

$ /usr/bin/git grep -P --name-only 
"\*\s*skb_put\s*\(\s*([\w\.\[\]\>\-]+)\s*,\s*1\s*\)\s*=\s*([^;]+);" | \
  xargs perl -p -i -e 
's/\*\s*skb_put\s*\(\s*([\w\.\[\]\>\-]+)\s*,\s*1\s*\)\s*=\s*([^;]+);/skb_put_char(\1,
 \2);/'


Reply via email to