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>
This commit is contained in:

committed by
David S. Miller

parent
1baf5ebf89
commit
a6a188e489
@@ -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) |
|
||||
|
Reference in New Issue
Block a user