[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <24d96a47-bd0c-4110-be64-e0d3a3dc8a24@amd.com>
Date: Thu, 26 Oct 2023 09:10:15 -0700
From: "Nelson, Shannon" <shannon.nelson@....com>
To: Justin Stitt <justinstitt@...gle.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Shay Agroskin <shayagr@...zon.com>, Arthur Kiyanovski <akiyano@...zon.com>,
David Arinzon <darinzon@...zon.com>, Noam Dagan <ndagan@...zon.com>,
Saeed Bishara <saeedb@...zon.com>, Rasesh Mody <rmody@...vell.com>,
Sudarsana Kalluru <skalluru@...vell.com>, GR-Linux-NIC-Dev@...vell.com,
Dimitris Michailidis <dmichail@...gible.com>,
Yisen Zhuang <yisen.zhuang@...wei.com>, Salil Mehta
<salil.mehta@...wei.com>, Jesse Brandeburg <jesse.brandeburg@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Louis Peens <louis.peens@...igine.com>, Brett Creeley
<brett.creeley@....com>, drivers@...sando.io,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>, Ronak Doshi <doshir@...are.com>,
VMware PV-Drivers Reviewers <pv-drivers@...are.com>,
Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <nathan@...nel.org>, Kees Cook <keescook@...omium.org>,
intel-wired-lan@...ts.osuosl.org, oss-drivers@...igine.com,
linux-hyperv@...r.kernel.org
Subject: Re: [PATCH 2/3] treewide: Convert some ethtool_sprintf() to
ethtool_puts()
On 10/25/2023 4:40 PM, Justin Stitt wrote:
>
> This patch converts some basic cases of ethtool_sprintf() to
> ethtool_puts().
>
> The conversions are used in cases where ethtool_sprintf() was being used
> with just two arguments:
> | ethtool_sprintf(&data, buffer[i].name);
> or when it's used with format string: "%s"
> | ethtool_sprintf(&data, "%s", buffer[i].name);
> which both now become:
> | ethtool_puts(&data, buffer[i].name);
>
> There are some outstanding patches [1] that I've sent using plain "%s"
> with ethtool_sprintf() that should be ethtool_puts() now. Some have been
> picked up as-is but I will send new versions for the others.
>
> [1]: https://lore.kernel.org/all/?q=dfb%3Aethtool_sprintf+AND+f%3Ajustinstitt
>
> Signed-off-by: Justin Stitt <justinstitt@...gle.com>
[...]
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_stats.c b/drivers/net/ethernet/pensando/ionic/ionic_stats.c
> index 9859a4432985..1f6022fb7679 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_stats.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_stats.c
> @@ -258,10 +258,10 @@ static void ionic_sw_stats_get_strings(struct ionic_lif *lif, u8 **buf)
> int i, q_num;
>
> for (i = 0; i < IONIC_NUM_LIF_STATS; i++)
> - ethtool_sprintf(buf, ionic_lif_stats_desc[i].name);
> + ethtool_puts(buf, ionic_lif_stats_desc[i].name);
>
> for (i = 0; i < IONIC_NUM_PORT_STATS; i++)
> - ethtool_sprintf(buf, ionic_port_stats_desc[i].name);
> + ethtool_puts(buf, ionic_port_stats_desc[i].name);
>
> for (q_num = 0; q_num < MAX_Q(lif); q_num++)
> ionic_sw_stats_get_tx_strings(lif, buf, q_num);
This works for me for the ionic driver
Reviewed-by: Shannon Nelson <shannon.nelson@....com>
Powered by blists - more mailing lists