From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stargate.chelsio.com (unknown [12.32.117.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8636B2D0C82; Tue, 30 Jun 2026 08:41:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=12.32.117.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782808916; cv=none; b=aJbCM9w+n85uLI3X58JSntmV4cT1er8j9Mm0RsVF+cgJwvIqIGJ9AAbqdmGJcysp0S2Y8CmPjZSeJ+p/7Px7oKhdoy8pBH2nAvlm3sgY86pz7ANTZN9J6nnziUo7wPUlmHMXPpT4ErYNIPR19vdRcDlCCrkDCbQhA87sosHj/gA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782808916; c=relaxed/simple; bh=87u65cYfvDzYnS7FJ4gbEX79iiGZMqB5TqN9Adkcvrs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Phv4FUxVjF4ip+/izntER2QaWzMWZacjS1sgihuxnnIP7XSV80rhrM462ZjcvRlZmBEFYjZ8Rxd1bQBwT+pbmzBScUR9oBgquDSeAxaB6UhP8W53ajeSBWK5N4b1VBUDV0ALeIf3BWj7531YuUAjTsA4gpP/A3yEEASwj09RcO4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=chelsio.com; spf=pass smtp.mailfrom=chelsio.com; arc=none smtp.client-ip=12.32.117.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=chelsio.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chelsio.com Received: from localhost (bharat.asicdesigners.com [10.193.191.32]) by stargate.chelsio.com (8.14.7/8.14.7) with ESMTP id 65U8ZU57017800; Tue, 30 Jun 2026 01:35:32 -0700 Date: Tue, 30 Jun 2026 14:05:20 +0530 From: Potnuri Bharat Teja To: Markov Gleb Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "netdev@vger.kernel.org" , open list , "lvc-project@linuxtesting.org" Subject: Re: [PATCH net] cxgb4: Fix decode strings dump for T6 adapters Message-ID: References: <20260629130856.1168-1-markov.gi@npc-ksb.ru> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > > 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 > --- Thank you, This redundant code can be removed. Reviewed-by: Potnuri Bharat Teja > 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 > >