public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mike Marciniszyn <infinipath@intel.com>,
	Dave Olson <dave.olson@qlogic.com>
Cc: Roland Dreier <roland@kernel.org>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] IB/ipath: remove some left over code
Date: Thu, 26 Feb 2015 23:43:35 +0300	[thread overview]
Message-ID: <20150226204335.GG6820@mwanda> (raw)

"ret" is always zero here after commit c4bce8032ef4 ('IB/ipath: Add new
chip-specific functions to older chips, consistent init').

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I just happened to spot this dead code when I was reviewing a different
static checker warning:

	drivers/infiniband/hw/ipath/ipath_verbs.c:2266 show_hca()
	warn: bool is not less than zero.

It looks to me that this code returns 0 on success and 1 on failure so
the warning is correct.  This is very strange.  The documentation
doesn't say anything about what the return codes mean so it is all very
puzzling.

diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c
index 7cc3054..3de90e9 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6110.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c
@@ -721,10 +721,6 @@ static int ipath_ht_boardname(struct ipath_devdata *dd, char *name,
 	if (n)
 		snprintf(name, namelen, "%s", n);
 
-	if (ret) {
-		ipath_dev_err(dd, "Unsupported InfiniPath board %s!\n", name);
-		goto bail;
-	}
 	if (dd->ipath_majrev != 3 || (dd->ipath_minrev < 2 ||
 		dd->ipath_minrev > 4)) {
 		/*

             reply	other threads:[~2015-02-26 20:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 20:43 Dan Carpenter [this message]
2015-03-17  1:09 ` [patch] IB/ipath: remove some left over code Marciniszyn, Mike

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=20150226204335.GG6820@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dave.olson@qlogic.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=infinipath@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=roland@kernel.org \
    --cc=sean.hefty@intel.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