Netdev List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jackm@dev.mellanox.co.il
Cc: netdev@vger.kernel.org
Subject: re: mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet
Date: Sat, 9 Jun 2012 12:09:18 +0300	[thread overview]
Message-ID: <20120609090918.GB877@elgon.mountain> (raw)

Hello Jack Morgenstein,

The patch ab9c17a009ee: "mlx4_core: Modify driver initialization flow 
to accommodate SRIOV for Ethernet" from Dec 13, 2011, leads to the 
following static checker warning:

drivers/net/ethernet/mellanox/mlx4/main.c:424 mlx4_slave_cap()
	warn: suspicious bitop condition

   423          /*fail if the hca has an unknown capability */
   424          if ((hca_param.global_caps | HCA_GLOBAL_CAP_MASK) !=
   425              HCA_GLOBAL_CAP_MASK) {
   426                  mlx4_err(dev, "Unknown hca global capabilities\n");
   427                  return -ENOSYS;
   428          }

The test sort of makes sense but HCA_GLOBAL_CAP_MASK is zero so we could
as well say:

	if (hca_param.global_caps) { ...

regards,
dan carpenter

             reply	other threads:[~2012-06-09  9:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-09  9:09 Dan Carpenter [this message]
2012-06-09 11:29 ` mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet Jack Morgenstein
2012-06-10  1:03   ` Ben Hutchings
2012-06-17 15:18     ` Jack Morgenstein

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=20120609090918.GB877@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=jackm@dev.mellanox.co.il \
    --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