All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org, Rasesh Mody <rmody@marvell.com>,
	Devendra Singh Rawat <dsinghrawat@marvell.com>,
	Igor Russkikh <irusskikh@marvell.com>
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	[thread overview]
Message-ID: <7105742b042a813a391466d6706bb809c1bd9569.1638291548.git.anatoly.burakov@intel.com> (raw)

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 <anatoly.burakov@intel.com>
---

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


             reply	other threads:[~2021-11-30 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 16:59 Anatoly Burakov [this message]
2022-01-10  7:19 ` [PATCH v1 1/1] net/qede: fix redundant condition in debug code Jerin Jacob
2022-01-10  7:35   ` [EXT] " Devendra Singh Rawat
2022-01-10  8:15   ` Igor Russkikh
2022-01-10  8:43 ` [EXT] " Rasesh Mody
2022-01-11 12:04   ` Jerin Jacob

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=7105742b042a813a391466d6706bb809c1bd9569.1638291548.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=dsinghrawat@marvell.com \
    --cc=irusskikh@marvell.com \
    --cc=rmody@marvell.com \
    --cc=stable@dpdk.org \
    /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.