summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-04-28 15:31:06 +0800
committerDoug Ledford <dledford@redhat.com>2018-05-01 11:27:37 -0400
commitecb238f6a7f369b5e0eece4e913c9d671208860c (patch)
tree2dd01e37037c31b0fbf974f233bc0c74357d3b32 /drivers/infiniband/sw/rxe
parent2f6e51365727a1428d281821ec928904c723e47d (diff)
downloadlinux-ecb238f6a7f369b5e0eece4e913c9d671208860c.tar.gz
linux-ecb238f6a7f369b5e0eece4e913c9d671208860c.tar.bz2
linux-ecb238f6a7f369b5e0eece4e913c9d671208860c.zip
IB/cxgb4: use skb_put_zero()/__skb_put_zero
Use the recently introduced helper to replace the pattern of skb_put_zero/__skb_put() && memset(). Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_net.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index fca13a6281f0..95e52b3ec757 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -565,11 +565,9 @@ struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
pkt->rxe = rxe;
pkt->port_num = port_num;
- pkt->hdr = skb_put(skb, paylen);
+ pkt->hdr = skb_put_zero(skb, paylen);
pkt->mask |= RXE_GRH_MASK;
- memset(pkt->hdr, 0, paylen);
-
dev_put(ndev);
return skb;
}