summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/srq.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-04-28 12:35:22 +0800
committerDavid S. Miller <davem@davemloft.net>2018-04-30 11:53:48 -0400
commita6a188e48959829fc6d64a1b52762314bcaf6417 (patch)
tree5812e6ad1913b7e07b005b804acaf991ea72d662 /drivers/net/ethernet/chelsio/cxgb4/srq.c
parent1baf5ebf8954d9bff8fa4e7dd6c416a0cebdb9e2 (diff)
downloadtalos-op-linux-a6a188e48959829fc6d64a1b52762314bcaf6417.tar.gz
talos-op-linux-a6a188e48959829fc6d64a1b52762314bcaf6417.zip
libcxgb,cxgb4: use __skb_put_zero to simplfy code
use helper __skb_put_zero to replace the pattern of __skb_put() && memset() Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/srq.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/srq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/srq.c b/drivers/net/ethernet/chelsio/cxgb4/srq.c
index 6228a5708307..82b70a565e24 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/srq.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/srq.c
@@ -84,8 +84,7 @@ int cxgb4_get_srq_entry(struct net_device *dev,
if (!skb)
return -ENOMEM;
req = (struct cpl_srq_table_req *)
- __skb_put(skb, sizeof(*req));
- memset(req, 0, sizeof(*req));
+ __skb_put_zero(skb, sizeof(*req));
INIT_TP_WR(req, 0);
OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SRQ_TABLE_REQ,
TID_TID_V(srq_idx) |
OpenPOWER on IntegriCloud