Re: [PATCH V2 net-next 3/8] net: hns3: use hns3_get_ops() helper to reduce the unnecessary middle layer conversion

From: Michal Swiatkowski
Date: Tue Jun 17 2025 - 10:28:59 EST


On Tue, Jun 17, 2025 at 09:02:50AM +0800, Jijie Shao wrote:
> 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.

Thanks for rewording the commit message.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@xxxxxxxxxxxxxxx>

>
> Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230310081404.947-1-lanhao@xxxxxxxxxx/

I hope you will add getting hns3 device from netdev too in the future
(as this is main point in the link).

> Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>
> ---
> ChangeLog:
> v1 -> v2:
> - Change commit message and title, suggested by Michal Swiatkowski.
> v1: https://lore.kernel.org/all/20250612021317.1487943-1-shaojijie@xxxxxxxxxx/
> ---

[...]