Re: [PATCH net-next] net: hisilicon: hns3: use ethtool string helpers
From: Rosen Penev
Date: Tue Nov 05 2024 - 13:38:10 EST
On Tue, Nov 5, 2024 at 6:00 AM Simon Horman <horms@xxxxxxxxxx> wrote:
>
> On Fri, Nov 01, 2024 at 03:00:23PM -0700, Rosen Penev wrote:
> > 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@xxxxxxxxx>
> > Reviewed-by: Jijie Shao <shaojijie@xxxxxxxxxx>
> > Tested-by: Jijie Shao <shaojijie@xxxxxxxxxx>
>
> ...
>
> > diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> > index 97eaeec1952b..b6cc51bfdd33 100644
> > --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> > @@ -509,54 +509,38 @@ static int hns3_get_sset_count(struct net_device *netdev, int stringset)
> > }
> > }
> >
> > -static void *hns3_update_strings(u8 *data, const struct hns3_stats *stats,
> > - u32 stat_count, u32 num_tqps, const char *prefix)
> > +static void hns3_update_strings(u8 **data, const struct hns3_stats *stats,
> > + u32 stat_count, u32 num_tqps,
> > + const char *prefix)
> > {
> > #define MAX_PREFIX_SIZE (6 + 4)
>
> Hi Rosen,
>
> As per Jakub's feedback on v1, can't this #define be removed?
Removed in v2.
>
> ...