1
0
Fork 0
remarkable-linux/drivers/scsi/fnic
Johannes Berg d58ff35122 networking: make skb_push & __skb_push return void pointers
It seems like a historic accident that these return unsigned char *,
and in many places that means casts are required, more often than not.

Make these functions return void * and remove all the casts across
the tree, adding a (u8 *) cast only where the unsigned char pointer
was used directly, all done with the following spatch:

    @@
    expression SKB, LEN;
    typedef u8;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

    @@
    expression SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - fn(SKB, LEN)[0]
    + *(u8 *)fn(SKB, LEN)

Note that the last part there converts from push(...)[0] to the
more idiomatic *(u8 *)push(...).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16 11:48:40 -04:00
..
Makefile [SCSI] fnic: Fnic Trace Utility 2013-02-22 17:32:07 +00:00
cq_desc.h
cq_enet_desc.h
cq_exch_desc.h
fcpio.h
fnic.h scsi: fnic: Adding debug IO and Abort latency counter to fnic stats 2017-03-23 09:57:23 -04:00
fnic_attrs.c
fnic_debugfs.c x86/mm: Decouple <linux/vmalloc.h> from <asm/io.h> 2015-06-03 12:02:00 +02:00
fnic_fcs.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
fnic_fip.h fc_fip: Update to latest FC-BB-6 draft 2016-07-13 22:04:27 -04:00
fnic_io.h [SCSI] fnic: New debug flags and debug log messages 2013-02-22 17:31:09 +00:00
fnic_isr.c scsi: fnic: switch to pci_alloc_irq_vectors 2017-03-23 09:51:10 -04:00
fnic_main.c scsi: remove eh_timed_out methods in the transport template 2017-02-06 19:10:03 -05:00
fnic_res.c
fnic_res.h
fnic_scsi.c scsi: fnic: Adding debug IO and Abort latency counter to fnic stats 2017-03-23 09:57:23 -04:00
fnic_stats.h scsi: fnic: Adding debug IO and Abort latency counter to fnic stats 2017-03-23 09:57:23 -04:00
fnic_trace.c scsi: fnic: Adding debug IO and Abort latency counter to fnic stats 2017-03-23 09:57:23 -04:00
fnic_trace.h scsi: fnic: Use time64_t to represent trace timestamps 2016-11-08 17:29:46 -05:00
rq_enet_desc.h
vnic_cq.c
vnic_cq.h
vnic_cq_copy.h
vnic_dev.c scsi: fnic: use kernel's '%pM' format option to print MAC 2016-11-08 17:29:57 -05:00
vnic_dev.h [SCSI] fnic: FIP VLAN Discovery Feature Support 2013-05-02 07:30:40 -07:00
vnic_devcmd.h [SCSI] fnic: FIP VLAN Discovery Feature Support 2013-05-02 07:30:40 -07:00
vnic_intr.c
vnic_intr.h
vnic_nic.h
vnic_resource.h
vnic_rq.c
vnic_rq.h
vnic_scsi.h [SCSI] fnic: fnic Driver Tuneables Exposed through CLI 2013-09-11 15:59:25 -07:00
vnic_stats.h
vnic_wq.c
vnic_wq.h
vnic_wq_copy.c
vnic_wq_copy.h
wq_enet_desc.h