[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1497565397.2518.18.camel@sipsolutions.net>
Date: Fri, 16 Jun 2017 00:23:17 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Joe Perches <joe@...ches.com>, David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] skbuff: make skb_put_zero() return void
On Thu, 2017-06-15 at 15:17 -0700, Joe Perches wrote:
> 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);/'
Btw, this is incomplete - you have "\*\s*" at the beginning, but there
are cases like
*(skb_put(skb, 1)) = c;
where you have extra parentheses. By just adding them to the spatch, it
finds both cases trivially.
I'm much more comfortable using spatch to do things like this.
johannes
Powered by blists - more mailing lists