alistair23-linux/drivers/staging
yuan linyu de77b966ce net: introduce __skb_put_[zero, data, u8]
follow Johannes Berg, semantic patch file as below,
@@
identifier p, p2;
expression len;
expression skb;
type t, t2;
@@
(
-p = __skb_put(skb, len);
+p = __skb_put_zero(skb, len);
|
-p = (t)__skb_put(skb, len);
+p = __skb_put_zero(skb, len);
)
... when != p
(
p2 = (t2)p;
-memset(p2, 0, len);
|
-memset(p, 0, len);
)

@@
identifier p;
expression len;
expression skb;
type t;
@@
(
-t p = __skb_put(skb, len);
+t p = __skb_put_zero(skb, len);
)
... when != p
(
-memset(p, 0, len);
)

@@
type t, t2;
identifier p, p2;
expression skb;
@@
t *p;
...
(
-p = __skb_put(skb, sizeof(t));
+p = __skb_put_zero(skb, sizeof(t));
|
-p = (t *)__skb_put(skb, sizeof(t));
+p = __skb_put_zero(skb, sizeof(t));
)
... when != p
(
p2 = (t2)p;
-memset(p2, 0, sizeof(*p));
|
-memset(p, 0, sizeof(*p));
)

@@
expression skb, len;
@@
-memset(__skb_put(skb, len), 0, len);
+__skb_put_zero(skb, len);

@@
expression skb, len, data;
@@
-memcpy(__skb_put(skb, len), data, len);
+__skb_put_data(skb, data, len);

@@
expression SKB, C, S;
typedef u8;
identifier fn = {__skb_put};
fresh identifier fn2 = fn ## "_u8";
@@
- *(u8 *)fn(SKB, S) = C;
+ fn2(SKB, C);

Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-20 13:30:14 -04:00
..
android staging/android/ion: remove useless document file 2017-05-15 11:17:31 +02:00
board
ccree staging: ccree: fix buffer copy 2017-06-06 16:23:27 +02:00
clocking-wizard
comedi staging: comedi: addi_apci_3xxx: check return value 2017-04-25 20:43:42 +02:00
dgnc staging: dgnc: remove error message task 2017-03-29 09:37:10 +02:00
emxx_udc
fbtft staging: fbtft: fix open parentheses alignment 2017-04-28 12:07:25 +02:00
fsl-dpaa2 staging: fsl-dpaa2/eth: add ETHERNET dependency 2017-05-16 14:23:31 +02:00
fsl-mc staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd 2017-04-28 17:51:54 +02:00
fwserial
gdm724x networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
goldfish
greybus staging: greybus: uart.c: Remove include linux/serial.h 2017-04-18 13:27:16 +02:00
gs_fpgaboot
iio Staging: iio: accel: adis16203: fixed a brace coding style issue 2017-04-14 16:13:34 +01:00
ks7010 networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
lustre staging/lustre/lov: remove set_fs() call from lov_getstripe() 2017-06-03 17:17:19 +09:00
media [media] atomisp: don't treat warnings as errors 2017-06-04 15:23:32 -03:00
most networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
mt29f_spinand
netlogic net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
nvec Staging: nvec: Remove FSF's mailing address 2017-04-08 12:55:25 +02:00
octeon net: introduce __skb_put_[zero, data, u8] 2017-06-20 13:30:14 -04:00
octeon-usb
olpc_dcon staging: olpc_dcon: style fixes 2017-04-28 12:07:24 +02:00
rtl8188eu networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
rtl8192e networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
rtl8192u networking: make skb_put & friends return void pointers 2017-06-16 11:48:39 -04:00
rtl8712 networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
rtl8723bs networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
rts5208 staging: rts5208: ms.c fixed checkpatch warning - using __func__ instead of hardcoded name 2017-04-08 17:05:59 +02:00
skein
sm750fb staging: sm750fb: removed line continuations in quoted strings 2017-04-08 17:00:52 +02:00
speakup Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
typec staging: typec: fusb302: refactor resume retry mechanism 2017-05-16 14:23:31 +02:00
unisys staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y 2017-04-28 11:55:53 +02:00
vc04_services staging: vc04_services: Fix bulk cache maintenance 2017-05-15 11:48:44 +02:00
vme Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
vt6655 Staging: vt6655 - block comments style fix 2017-03-29 09:39:08 +02:00
vt6656 staging: vt6656: use tabs instead of spaces 2017-04-28 14:30:43 +02:00
wilc1000 networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
wlan-ng networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
xgifb staging: xgifb: added blankline after decl. 2017-04-08 17:05:59 +02:00
Kconfig Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
Makefile Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00