]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: use hns3_get_ops() helper to reduce the unnecessary middle layer conversion
authorJijie Shao <shaojijie@huawei.com>
Mon, 23 Jun 2025 04:00:39 +0000 (12:00 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Jun 2025 00:09:21 +0000 (17:09 -0700)
commit5306c10396866b8050d1bb8ca9dddaab607409e5
tree92cc495d9270984afc8872f818f3910c6812a786
parent2031f01394b2cc73538b3eeec191ffb03a1de5a0
net: hns3: use hns3_get_ops() helper to reduce the unnecessary middle layer conversion

There are too many indirection layers in the HNS3 driver code,
This issue was previously discussed with the maintainer,
who suggested adding a helper function to fix the issue.
In fact, the hns3_get_ops() helper is already defined
and can fix this issue.

This patch uses hns3_get_ops() helper to reduce the unnecessary
middle layer conversion. Apply it to the whole HNS3 driver.
The former discusstion can be checked from the link.

Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230310081404.947-1-lanhao@huawei.com/
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250623040043.857782-4-shaojijie@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c