summaryrefslogtreecommitdiff
path: root/drivers/net/caif
diff options
context:
space:
mode:
authoryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>2017-06-18 22:52:04 +0800
committerDavid S. Miller <davem@davemloft.net>2017-06-20 13:30:15 -0400
commitb952f4dff2751252db073c27c0f8a16a416a2ddc (patch)
treefda132505741ee4d859ae09f45966656ea557572 /drivers/net/caif
parentad941e693b24ad8b13c28382d323552ef6fb434b (diff)
net: manual clean code which call skb_put_[data:zero]
Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/caif')
-rw-r--r--drivers/net/caif/caif_hsi.c6
-rw-r--r--drivers/net/caif/caif_serial.c3
-rw-r--r--drivers/net/caif/caif_spi.c3
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 4534326e20ac..11ba6e3eea22 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -426,7 +426,6 @@ static int cfhsi_rx_desc(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
/* Check for embedded CAIF frame. */
if (desc->offset) {
struct sk_buff *skb;
- u8 *dst = NULL;
int len = 0;
pfrm = ((u8 *)desc) + desc->offset;
@@ -454,7 +453,7 @@ static int cfhsi_rx_desc(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
}
caif_assert(skb != NULL);
- dst = skb_put_data(skb, pfrm, len);
+ skb_put_data(skb, pfrm, len);
skb->protocol = htons(ETH_P_CAIF);
skb_reset_mac_header(skb);
@@ -555,7 +554,6 @@ static int cfhsi_rx_pld(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
/* Parse payload. */
while (nfrms < CFHSI_MAX_PKTS && *plen) {
struct sk_buff *skb;
- u8 *dst = NULL;
u8 *pcffrm = NULL;
int len;
@@ -584,7 +582,7 @@ static int cfhsi_rx_pld(struct cfhsi_desc *desc, struct cfhsi *cfhsi)
}
caif_assert(skb != NULL);
- dst = skb_put_data(skb, pcffrm, len);
+ skb_put_data(skb, pcffrm, len);
skb->protocol = htons(ETH_P_CAIF);
skb_reset_mac_header(skb);
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 5c57be2082ba..709838e4c062 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -171,7 +171,6 @@ static void ldisc_receive(struct tty_struct *tty, const u8 *data,
struct sk_buff *skb = NULL;
struct ser_device *ser;
int ret;
- u8 *p;
ser = tty->disc_data;
@@ -198,7 +197,7 @@ static void ldisc_receive(struct tty_struct *tty, const u8 *data,
skb = netdev_alloc_skb(ser->dev, count+1);
if (skb == NULL)
return;
- p = skb_put_data(skb, data, count);
+ skb_put_data(skb, data, count);
skb->protocol = htons(ETH_P_CAIF);
skb_reset_mac_header(skb);
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
index 24a5f5ca2037..207cb8423de0 100644
--- a/drivers/net/caif/caif_spi.c
+++ b/drivers/net/caif/caif_spi.c
@@ -526,7 +526,6 @@ int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len)
struct sk_buff *skb = NULL;
int spad = 0;
int epad = 0;
- u8 *dst = NULL;
int pkt_len = 0;
/*
@@ -548,7 +547,7 @@ int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len)
skb = netdev_alloc_skb(cfspi->ndev, pkt_len + 1);
caif_assert(skb != NULL);
- dst = skb_put_data(skb, src, pkt_len);
+ skb_put_data(skb, src, pkt_len);
src += pkt_len;
skb->protocol = htons(ETH_P_CAIF);