mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 18:11:56 +00:00
59ae1d127a
A common pattern with skb_put() is to just want to memcpy() some data into the new space, introduce skb_put_data() for this. An spatch similar to the one for skb_put_zero() converts many of the places using it: @@ identifier p, p2; expression len, skb, data; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_data(skb, data, len); | -p = (t)skb_put(skb, len); +p = skb_put_data(skb, data, len); ) ( p2 = (t2)p; -memcpy(p2, data, len); | -memcpy(p, data, len); ) @@ type t, t2; identifier p, p2; expression skb, data; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); ) ( p2 = (t2)p; -memcpy(p2, data, sizeof(*p)); | -memcpy(p, data, sizeof(*p)); ) @@ expression skb, len, data; @@ -memcpy(skb_put(skb, len), data, len); +skb_put_data(skb, data, len); (again, manually post-processed to retain some comments) Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
amd7930_fn.c | ||
amd7930_fn.h | ||
arcofi.c | ||
arcofi.h | ||
asuscom.c | ||
avm_a1.c | ||
avm_a1p.c | ||
avm_pci.c | ||
avma1_cs.c | ||
bkm_a4t.c | ||
bkm_a8.c | ||
bkm_ax.h | ||
callc.c | ||
config.c | ||
diva.c | ||
elsa_cs.c | ||
elsa_ser.c | ||
elsa.c | ||
enternow_pci.c | ||
fsm.c | ||
fsm.h | ||
gazel.c | ||
hfc4s8s_l1.c | ||
hfc4s8s_l1.h | ||
hfc_2bds0.c | ||
hfc_2bds0.h | ||
hfc_2bs0.c | ||
hfc_2bs0.h | ||
hfc_pci.c | ||
hfc_pci.h | ||
hfc_sx.c | ||
hfc_sx.h | ||
hfc_usb.c | ||
hfc_usb.h | ||
hfcscard.c | ||
hisax_cfg.h | ||
hisax_debug.h | ||
hisax_fcpcipnp.c | ||
hisax_fcpcipnp.h | ||
hisax_if.h | ||
hisax_isac.c | ||
hisax_isac.h | ||
hisax.h | ||
hscx_irq.c | ||
hscx.c | ||
hscx.h | ||
icc.c | ||
icc.h | ||
ipac.h | ||
ipacx.c | ||
ipacx.h | ||
isac.c | ||
isac.h | ||
isar.c | ||
isar.h | ||
isdnl1.c | ||
isdnl1.h | ||
isdnl2.c | ||
isdnl2.h | ||
isdnl3.c | ||
isdnl3.h | ||
isurf.c | ||
ix1_micro.c | ||
jade_irq.c | ||
jade.c | ||
jade.h | ||
Kconfig | ||
l3_1tr6.c | ||
l3_1tr6.h | ||
l3dss1.c | ||
l3dss1.h | ||
l3ni1.c | ||
l3ni1.h | ||
lmgr.c | ||
Makefile | ||
mic.c | ||
netjet.c | ||
netjet.h | ||
niccy.c | ||
nj_s.c | ||
nj_u.c | ||
q931.c | ||
s0box.c | ||
saphir.c | ||
sedlbauer_cs.c | ||
sedlbauer.c | ||
sportster.c | ||
st5481_b.c | ||
st5481_d.c | ||
st5481_init.c | ||
st5481_usb.c | ||
st5481.h | ||
tei.c | ||
teleint.c | ||
teles0.c | ||
teles3.c | ||
teles_cs.c | ||
telespci.c | ||
w6692.c | ||
w6692.h |