linux_dsm_epyc7002/drivers/net/wireless/ath/ath10k
Johannes Berg 59ae1d127a networking: introduce and use skb_put_data()
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>
2017-06-16 11:48:37 -04:00
..
ahb.c ath10k: fix NAPI enable/disable symmetry for AHB interface 2017-04-05 10:33:26 +03:00
ahb.h ath10k: expose hif ops for ahb 2016-01-28 10:47:28 +02:00
bmi.c ath10k: sdio get target info 2017-05-04 15:55:41 +03:00
bmi.h ath10k: sdio get target info 2017-05-04 15:55:41 +03:00
ce.c ath10k: fix compile time sanity check for CE4 buffer size 2017-04-13 15:44:27 +03:00
ce.h ath10k: dump Copy Engine registers during firmware crash 2017-01-19 15:19:24 +02:00
core.c ath10k: different fw file name for sdio 2017-05-04 15:55:50 +03:00
core.h ath10k: various sdio related definitions 2017-05-04 15:55:31 +03:00
debug.c ath10k: fix out of bounds access to local buffer 2017-05-04 15:58:57 +03:00
debug.h ath10k: various sdio related definitions 2017-05-04 15:55:31 +03:00
debugfs_sta.c ath10k: use octal permission representation 2017-04-05 10:43:44 +03:00
hif.h ath10k: clean header files from bad block comments 2017-04-05 10:45:21 +03:00
htc.c ath10k: htc: ready_ext msg support 2017-05-04 15:55:45 +03:00
htc.h ath10k: htc: ready_ext msg support 2017-05-04 15:55:45 +03:00
htt_rx.c mac80211: rename ieee80211_rx_status::vht_nss to just nss 2017-04-28 10:41:53 +02:00
htt_tx.c ath10k: fix block comments style 2017-04-05 10:41:03 +03:00
htt.c ath10k: add per peer htt tx stats support for 10.4 2016-11-23 21:40:02 +02:00
htt.h ath10k: clean header files from bad block comments 2017-04-05 10:45:21 +03:00
hw.c wireless-drivers-next patches for 4.12 2017-04-09 18:13:12 -07:00
hw.h ath10k: various sdio related definitions 2017-05-04 15:55:31 +03:00
Kconfig ath10k: add initial SDIO support 2017-05-04 15:55:55 +03:00
mac.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
mac.h ath10k: remove ath10k_vif_to_arvif() 2017-02-14 19:38:15 +02:00
Makefile ath10k: add initial SDIO support 2017-05-04 15:55:55 +03:00
p2p.c ath10k: remove ath10k_vif_to_arvif() 2017-02-14 19:38:15 +02:00
p2p.h
pci.c ath10k: bump up FW API to 6 2017-04-19 17:06:42 +03:00
pci.h ath10k: fix reading sram contents for QCA4019 2017-02-07 10:57:49 +02:00
rx_desc.h ath10k: clean header files from bad block comments 2017-04-05 10:45:21 +03:00
sdio.c ath10k: add initial SDIO support 2017-05-04 15:55:55 +03:00
sdio.h ath10k: add initial SDIO support 2017-05-04 15:55:55 +03:00
spectral.c ath10k: fix spectral scan for QCA99X0 family of chipsets 2017-04-19 17:05:26 +03:00
spectral.h ath10k: refactor phyerr event handlers 2015-08-17 17:43:29 +03:00
swap.c ath10k: move firmware_swap_code_seg_info to ath10k_fw_file 2016-08-31 10:18:37 +03:00
swap.h ath10k: move firmware_swap_code_seg_info to ath10k_fw_file 2016-08-31 10:18:37 +03:00
targaddrs.h ath10k: various sdio related definitions 2017-05-04 15:55:31 +03:00
testmode_i.h ath10k: append the wmi_op_version to testmode get_version cmd 2017-05-04 15:59:48 +03:00
testmode.c ath10k: append the wmi_op_version to testmode get_version cmd 2017-05-04 15:59:48 +03:00
testmode.h
thermal.c ath10k: use octal permission representation 2017-04-05 10:43:44 +03:00
thermal.h ath10k: fix checkpatch warnings related to spaces 2016-04-14 17:30:51 +03:00
trace.c
trace.h ath10k: add hw_rev to trace events to support pktlog 2016-03-03 19:20:00 +02:00
txrx.c ath10k: fix block comments style 2017-04-05 10:41:03 +03:00
txrx.h ath10k: move mgmt descriptor limit handle under mgmt_tx 2016-03-18 09:52:27 +02:00
wmi-ops.h ath10k: clean header files from bad block comments 2017-04-05 10:45:21 +03:00
wmi-tlv.c ath10k: add VHT160 support 2017-01-13 15:26:30 +02:00
wmi-tlv.h ath10k: add VHT160 support 2017-01-13 15:26:30 +02:00
wmi.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
wmi.h ath10k: clean header files from bad block comments 2017-04-05 10:45:21 +03:00
wow.c ath10k: move fw_features to struct ath10k_fw_file 2016-04-20 20:00:25 +03:00
wow.h