All of lore.kernel.org
 help / color / mirror / Atom feed
From: Potnuri Bharat Teja <bharat@chelsio.com>
To: Markov Gleb <markov.gi@npc-ksb.ru>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: Re: [PATCH net] cxgb4: Fix decode strings dump for T6 adapters
Date: Tue, 30 Jun 2026 14:05:20 +0530	[thread overview]
Message-ID: <akN/yC11CPSPV0Kv@chelsio.com> (raw)
In-Reply-To: <20260629130856.1168-1-markov.gi@npc-ksb.ru>

On Monday, June 06/29/26, 2026 at 18:38:54 +0530, Markov Gleb wrote:
> From: Gleb Markov <markov.gi@npc-ksb.ru>
> 
> Depending on the value of chip_version, the correct decode set is selected.
> However, the subsequent matching with the t4 encoding type in the if-else
> block results in a reassignment, which leads to the loss of support for
> t6_decode as well as reinitializing of values t4_decode and t5_decode.
> 
> The component history shows that the if-else block previously used for
> this purpose, as well as the execution order, was not affected by the
> change.
> Furthermore, it is suggested by the execution order that the scenario with
> overwriting and loss of support will be implemented.
> 
> Delete the if-else block.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 6df397539cb0 ("cxgb4: Update correct encoding of SGE Ingress DMA States for T6 adapter")
> Signed-off-by: Gleb Markov <markov.gi@npc-ksb.ru>
> ---

Thank you, This redundant code can be removed.

Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com>

>  drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> index 8d719f82854a..f3e8153a7a0b 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> @@ -6735,14 +6735,6 @@ void t4_sge_decode_idma_state(struct adapter *adapter, int state)
>  		return;
>  	}
>  
> -	if (is_t4(adapter->params.chip)) {
> -		sge_idma_decode = (const char **)t4_decode;
> -		sge_idma_decode_nstates = ARRAY_SIZE(t4_decode);
> -	} else {
> -		sge_idma_decode = (const char **)t5_decode;
> -		sge_idma_decode_nstates = ARRAY_SIZE(t5_decode);
> -	}
> -
>  	if (state < sge_idma_decode_nstates)
>  		CH_WARN(adapter, "idma state %s\n", sge_idma_decode[state]);
>  	else
> -- 
> 2.43.0
> 
> 

  reply	other threads:[~2026-06-30  8:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 13:08 [PATCH net] cxgb4: Fix decode strings dump for T6 adapters Markov Gleb
2026-06-30  8:35 ` Potnuri Bharat Teja [this message]
2026-07-01  0:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=akN/yC11CPSPV0Kv@chelsio.com \
    --to=bharat@chelsio.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=markov.gi@npc-ksb.ru \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.