From: Vince Bridgers <vbridgers2013@gmail.com>
To: netdev@vger.kernel.org, davem@davemloft.net, peppe.cavallaro@st.com
Cc: vbridgers2013@gmail.com, vbridger@altera.com
Subject: [PATCH net v2 2/3] net: stmmac: Correct duplicate if/then/else case found by cppcheck
Date: Sun, 29 Jun 2014 20:34:52 -0500 [thread overview]
Message-ID: <1404092093-18630-3-git-send-email-vbridgers2013@gmail.com> (raw)
In-Reply-To: <1404092093-18630-1-git-send-email-vbridgers2013@gmail.com>
Cppcheck found a duplicate if/then/else case where a receive descriptor
was being processed. This patch corrects that issue.
cppcheck --force --enable=all --inline-suppr .
...
Checking enh_desc.c...
[enh_desc.c:148] -> [enh_desc.c:144]: (style) Found duplicate if expressions.
...
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
---
V2: No changes
---
drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
index 7e6628a..1e2bcf5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
@@ -145,7 +145,7 @@ static void enh_desc_get_ext_status(void *data, struct stmmac_extra_stats *x,
x->rx_msg_type_delay_req++;
else if (p->des4.erx.msg_type == RDES_EXT_DELAY_RESP)
x->rx_msg_type_delay_resp++;
- else if (p->des4.erx.msg_type == RDES_EXT_DELAY_REQ)
+ else if (p->des4.erx.msg_type == RDES_EXT_PDELAY_REQ)
x->rx_msg_type_pdelay_req++;
else if (p->des4.erx.msg_type == RDES_EXT_PDELAY_RESP)
x->rx_msg_type_pdelay_resp++;
--
1.7.9.5
next prev parent reply other threads:[~2014-06-30 1:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 1:34 [PATCH net v2 0/3] net: stmmac: Correct socfpga init/exit and Vince Bridgers
2014-06-30 1:34 ` [PATCH net v2 1/3] net: stmmac: add platform init/exit for Altera's ARM socfpga Vince Bridgers
2014-06-30 1:34 ` Vince Bridgers [this message]
2014-06-30 1:34 ` [PATCH net v2 3/3] net: stmmac: Remove unneeded I/O read caught by cppcheck Vince Bridgers
2014-07-03 1:38 ` [PATCH net v2 0/3] net: stmmac: Correct socfpga init/exit and David Miller
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=1404092093-18630-3-git-send-email-vbridgers2013@gmail.com \
--to=vbridgers2013@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=vbridger@altera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).