From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] bnx2x: Separate VF and PF logic
Date: Mon, 14 Nov 2016 14:12:41 +0000 [thread overview]
Message-ID: <20161114141241.GA32626@mwanda> (raw)
Hello Ariel Elior,
The patch ad5afc89365e: "bnx2x: Separate VF and PF logic" from Jan 1,
2013, leads to the following static checker warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:2944 bnx2x_nic_load()
warn: 'rc' can be either negative or positive
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
2797
2798 /* setup rss */
2799 rc = bnx2x_init_rss(bp);
2800 if (rc) {
2801 BNX2X_ERR("PF RSS init failed\n");
2802 LOAD_ERROR_EXIT(bp, load_error3);
2803 }
2804
The warning heuristic here is to complain if negative and positive
values are treated the same. This code is very confusing. For example,
the comments for bnx2x_queue_state_change() says it returns a positive
EBUSY but it does not.
But my main concern is bnx2x_setup_rss(), it either returns a negative
value or it returns 1. My understanding is that both of those returns
are treated as an error on line 2800 in the code above so it can't
possibly work.
regards,
dan carpenter
reply other threads:[~2016-11-14 14:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20161114141241.GA32626@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox