diff options
author | Rosen Penev <rosenp@gmail.com> | 2024-11-04 21:48:23 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-07 02:50:56 +0100 |
commit | 4ea3e221907aeee77c2f92953045121ddc9f5660 (patch) | |
tree | 2385d6b55d3bf60168ba459359800a8b65da68b1 /drivers/net/ethernet/hisilicon/hns3/hns3vf | |
parent | net: bnx2x: use ethtool string helpers (diff) | |
download | linux-4ea3e221907aeee77c2f92953045121ddc9f5660.tar.xz linux-4ea3e221907aeee77c2f92953045121ddc9f5660.zip |
net: hisilicon: hns3: use ethtool string helpers
The latter is the preferred way to copy ethtool strings.
Avoids manually incrementing the pointer. Cleans up the code quite well.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Jijie Shao <shaojijie@huawei.com>
Tested-by: Jijie Shao <shaojijie@huawei.com>
Link: https://patch.msgid.link/20241104204823.297277-1-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3vf')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 896f1eb172d3..8739da317897 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -130,12 +130,10 @@ static int hclgevf_get_sset_count(struct hnae3_handle *handle, int strset) } static void hclgevf_get_strings(struct hnae3_handle *handle, u32 strset, - u8 *data) + u8 **data) { - u8 *p = (char *)data; - if (strset == ETH_SS_STATS) - p = hclge_comm_tqps_get_strings(handle, p); + hclge_comm_tqps_get_strings(handle, data); } static void hclgevf_get_stats(struct hnae3_handle *handle, u64 *data) |