public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: ariele@broadcom.com
Cc: netdev@vger.kernel.org
Subject: re: bnx2x: Prepare device and initialize VF database
Date: Mon, 7 Jan 2013 11:18:37 +0300	[thread overview]
Message-ID: <20130107081836.GA5023@elgon.mountain> (raw)

Hello Ariel Elior,

The patch b56e9670ffa4: "bnx2x: Prepare device and initialize VF
database" from Jan 1, 2013, leads to the following warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1346
bnx2x_pretend_func()
	 warn: should this be '>= E1H_FUNC_MAX'

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
  1342  int bnx2x_pretend_func(struct bnx2x *bp, u16 pretend_func_val)
  1343  {
  1344          u32 pretend_reg;
  1345  
  1346          if (CHIP_IS_E1H(bp) && pretend_func_val > E1H_FUNC_MAX)
  1347                  return -1;
  1348  

This is static checker test has too many false positives so I haven't
released it.  Basically, every other place that uses E1H_FUNC_MAX
assumes we start counting from zero except this one.  I don't know the
code enough to say if it's a problem or intended.

regards,
dan carpenter

                 reply	other threads:[~2013-01-07  8:18 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=20130107081836.GA5023@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=ariele@broadcom.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox