Commit 76e1e5df authored by Xiu Jianfeng's avatar Xiu Jianfeng Committed by Jakub Kicinski

octeontx2-pf: Use memset_startat() helper in otx2_stop()

Use memset_startat() helper to simplify the code, there is no functional
change in this patch.
Signed-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Link: https://lore.kernel.org/r/20220516092337.131653-1-xiujianfeng@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 68a0bd67
...@@ -1794,8 +1794,7 @@ int otx2_stop(struct net_device *netdev) ...@@ -1794,8 +1794,7 @@ int otx2_stop(struct net_device *netdev)
kfree(qset->rq); kfree(qset->rq);
kfree(qset->napi); kfree(qset->napi);
/* Do not clear RQ/SQ ringsize settings */ /* Do not clear RQ/SQ ringsize settings */
memset((void *)qset + offsetof(struct otx2_qset, sqe_cnt), 0, memset_startat(qset, 0, sqe_cnt);
sizeof(*qset) - offsetof(struct otx2_qset, sqe_cnt));
return 0; return 0;
} }
EXPORT_SYMBOL(otx2_stop); EXPORT_SYMBOL(otx2_stop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment