Thread (10 messages) 10 messages, 4 authors, 2017-06-15

Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code

flat view

From: David Miller <davem@davemloft.net>
Date: 2017-06-14 19:38:53

From: Johannes Berg <johannes@sipsolutions.net>
Date: Wed, 14 Jun 2017 18:31:48 +0200
On Wed, 2017-06-14 at 18:29 +0200, Johannes Berg wrote:
quoted
On Wed, 2017-06-14 at 23:00 +0800, yuan linyu wrote:
quoted
sorry, I do them by hand. 
oh, ok.

This seems to work:

@@
identifier p;
expression len;
expression skb;
type t;
@@
-p = (t)skb_put(skb, len);
-memset(p, 0, len);
+p = (t)skb_put_zero(skb, len);
Nope, still didn't find everything - not the batman and atm cases for
example. But still a few more, I think that you didn't find, e.g. in
mac80211.

Anyway - I think none of this is really critical.
What do you think about Stephen Hemminger's feedback to make skb_put_zero()
return "void *".  It will avoid a lot of casts and make the conversions
look nicer.

I'll also defer on this patch series until we have the spatch thing
which can catch all of them.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help