mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-26 15:54:18 +08:00
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: Xiu Jianfeng <xiujianfeng@huawei.com> Link: https://lore.kernel.org/r/20220516092337.131653-1-xiujianfeng@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
68a0bd6790
commit
76e1e5df4b
@ -1794,8 +1794,7 @@ int otx2_stop(struct net_device *netdev)
|
||||
kfree(qset->rq);
|
||||
kfree(qset->napi);
|
||||
/* Do not clear RQ/SQ ringsize settings */
|
||||
memset((void *)qset + offsetof(struct otx2_qset, sqe_cnt), 0,
|
||||
sizeof(*qset) - offsetof(struct otx2_qset, sqe_cnt));
|
||||
memset_startat(qset, 0, sqe_cnt);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(otx2_stop);
|
||||
|
Loading…
Reference in New Issue
Block a user