From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D7C9A0C45; Tue, 30 Nov 2021 17:59:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C60F941142; Tue, 30 Nov 2021 17:59:45 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 89E78410F7; Tue, 30 Nov 2021 17:59:44 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10184"; a="299652887" X-IronPort-AV: E=Sophos;i="5.87,276,1631602800"; d="scan'208";a="299652887" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 08:59:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,276,1631602800"; d="scan'208";a="459672397" Received: from silpixa00401191.ir.intel.com ([10.55.128.95]) by orsmga006.jf.intel.com with ESMTP; 30 Nov 2021 08:59:14 -0800 From: Anatoly Burakov To: dev@dpdk.org, Rasesh Mody , Devendra Singh Rawat , Igor Russkikh Cc: stable@dpdk.org Subject: [PATCH v1 1/1] net/qede: fix redundant condition in debug code Date: Tue, 30 Nov 2021 16:59:13 +0000 Message-Id: <7105742b042a813a391466d6706bb809c1bd9569.1638291548.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Expression "a && 1" is equivalent to just "a", so fix the accidental inclusion of a literal in code. Cc: stable@dpdk.org Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection") Cc: rmody@marvell.com Signed-off-by: Anatoly Burakov --- Notes: This isn't a bug, this is just a syntactic anomaly, likely a remnant of some kind of debugging code. This issue was found with Control Flag [1], which i ran on DPDK codebase just out of curiosity. This was the only issue worth addressing that the tool produced output for. [1] https://github.com/IntelLabs/control-flag drivers/net/qede/qede_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c index 2297d245c4..ba807ea680 100644 --- a/drivers/net/qede/qede_debug.c +++ b/drivers/net/qede/qede_debug.c @@ -3522,7 +3522,7 @@ static enum dbg_status qed_grc_dump(struct ecore_hwfn *p_hwfn, /* Dump MCP HW Dump */ if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MCP_HW_DUMP) && - !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP) && 1) + !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP)) offset += qed_grc_dump_mcp_hw_dump(p_hwfn, p_ptt, dump_buf + offset, dump); -- 2.25.1