1
0
Fork 0
remarkable-linux/drivers/nfc/nxp-nci
Johannes Berg af72868b90 networking: make skb_pull & friends 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_pull,
            __skb_pull,
            skb_pull_inline,
            __pskb_pull_tail,
            __pskb_pull,
            pskb_pull
    };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = {
            skb_pull,
            __skb_pull,
            skb_pull_inline,
            __pskb_pull_tail,
            __pskb_pull,
            pskb_pull
    };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16 11:48:39 -04:00
..
Kconfig
Makefile NFC: Remove obsolete setting of DEBUG 2015-06-09 00:34:09 +02:00
core.c NFC: nxp-nci: constify nxp_nci_phy_ops structure 2015-10-19 20:04:13 +02:00
firmware.c networking: make skb_pull & friends return void pointers 2017-06-16 11:48:39 -04:00
i2c.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
nxp-nci.h NFC: nxp-nci: constify nxp_nci_phy_ops structure 2015-10-19 20:04:13 +02:00