From: "Jεan Sacren" <sakiwit@gmail.com>
To: Ariel Elior <aelior@marvell.com>
Cc: GR-everest-linux-l2@marvell.com, davem@davemloft.net,
kuba@kernel.org, netdev@vger.kernel.org
Subject: [PATCH net-next] net: qed_debug: fix check of false (grc_param < 0) expression
Date: Tue, 12 Oct 2021 01:46:45 -0600 [thread overview]
Message-ID: <20211012074645.12864-1-sakiwit@gmail.com> (raw)
From: Jean Sacren <sakiwit@gmail.com>
The type of enum dbg_grc_params has the enumerator list starting from 0.
When grc_param is declared by enum dbg_grc_params, (grc_param < 0) is
always false. We should remove the check of this expression.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
drivers/net/ethernet/qlogic/qed/qed_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c
index f6198b9a1b02..e3edca187ddf 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_debug.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c
@@ -5256,7 +5256,7 @@ enum dbg_status qed_dbg_grc_config(struct qed_hwfn *p_hwfn,
*/
qed_dbg_grc_init_params(p_hwfn);
- if (grc_param >= MAX_DBG_GRC_PARAMS || grc_param < 0)
+ if (grc_param >= MAX_DBG_GRC_PARAMS)
return DBG_STATUS_INVALID_ARGS;
if (val < s_grc_param_defs[grc_param].min ||
val > s_grc_param_defs[grc_param].max)
next reply other threads:[~2021-10-12 7:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 7:46 Jεan Sacren [this message]
2021-10-13 15:50 ` [PATCH net-next] net: qed_debug: fix check of false (grc_param < 0) expression patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2021-10-12 8:21 Shai Malin
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=20211012074645.12864-1-sakiwit@gmail.com \
--to=sakiwit@gmail.com \
--cc=GR-everest-linux-l2@marvell.com \
--cc=aelior@marvell.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.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.