Subject: Re: [PATCH] [v2] net: sfc: avoid format string warning

From: Breno Leitao <[email-masked]>
Date: Thu, 26 Mar 2026 02:17:59 -0700

On Wed, Mar 25, 2026 at 02:45:44PM +0100, Arnd Bergmann wrote:
>  	/* Event queues */
>  	efx_for_each_channel(channel, efx) {
> +		char unit_str[ETH_GSTRING_LEN];
> +
> +		snprintf(unit_str, sizeof(unit_str), "txq%d", channel->channel);

The original EFX_CHANNEL_NAME macro expanded to "chan%d", didn't it?.
Shouldn't replace txq by chan in the line above?

		snprintf(unit_str, sizeof(unit_str), "chan%d", channel->channel);

> @@ -258,23 +253,23 @@ static int efx_fill_loopback_test(struct efx_nic *efx,
>  	struct efx_tx_queue *tx_queue;
>  
>  	efx_for_each_channel_tx_queue(tx_queue, channel) {
> +		char unit_str[ETH_GSTRING_LEN];
> +
> +		snprintf(unit_str, sizeof(unit_str), "txq%d",tx_queue->label);

You probably want a space after the comma here:

		snprintf(unit_str, sizeof(unit_str), "txq%d", tx_queue->label);