All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Quinn Tran <quinn.tran@qlogic.com>,
	Saurav Kashyap <saurav.kashyap@qlogic.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: [PATCH 08/10] qla2xxx: Remove a superfluous test
Date: Tue, 27 Jan 2015 10:34:37 +0100	[thread overview]
Message-ID: <54C75BAD.3080209@sandisk.com> (raw)
In-Reply-To: <54C75AF8.90102@sandisk.com>

Avoid that smatch reports the following warning:

drivers/scsi/qla2xxx/qla_attr.c:1081: qla2x00_model_desc_show() warn: this array is probably non-NULL. 'vha->hw->model_desc'

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Quinn Tran <quinn.tran@qlogic.com>
Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 741d6e0..2087b73 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1077,8 +1077,7 @@ qla2x00_model_desc_show(struct device *dev, struct device_attribute *attr,
 			char *buf)
 {
 	scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
-	return scnprintf(buf, PAGE_SIZE, "%s\n",
-	    vha->hw->model_desc ? vha->hw->model_desc : "");
+	return scnprintf(buf, PAGE_SIZE, "%s\n", vha->hw->model_desc);
 }
 
 static ssize_t
-- 
2.1.2


  parent reply	other threads:[~2015-01-27  9:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  9:31 [PATCH 0/10] qla2xxx: Fix various warnings reported by static source code analysis tools Bart Van Assche
2015-01-27  9:32 ` [PATCH 01/10] qla2xxx: Report both rsp_info and rsp_info_len Bart Van Assche
2015-01-27  9:32 ` [PATCH 02/10] qla2xxx: Declare local functions static Bart Van Assche
2015-01-27  9:33 ` [PATCH 03/10] qla2xxx: Remove set-but-not-used variables Bart Van Assche
2015-01-27  9:33 ` [PATCH 04/10] qla2xxx: Replace two macros with an inline function Bart Van Assche
2015-01-27  9:33 ` [PATCH 05/10] qla2xxx: Remove __constant_ prefix Bart Van Assche
2015-01-27  9:34 ` [PATCH 06/10] qla2xxx: Avoid that sparse complains about duplicate [noderef] attributes Bart Van Assche
2015-01-27  9:34 ` [PATCH 07/10] qla2xxx: Fix sparse annotations Bart Van Assche
2015-01-27  9:34 ` Bart Van Assche [this message]
2015-01-27  9:34 ` [PATCH 09/10] qla2xxx: Remove dead code Bart Van Assche
2015-01-27  9:35 ` [PATCH 10/10] qla2xxx: Comment out " Bart Van Assche
2015-02-02  4:52 ` [PATCH 0/10] qla2xxx: Fix various warnings reported by static source code analysis tools Saurav Kashyap
2015-02-23  8:49   ` Bart Van Assche
2015-02-24  8:39     ` Saurav Kashyap
2015-06-02 20:08     ` Himanshu Madhani
2015-06-02 22:44       ` Bart Van Assche
2015-06-03  5:45         ` Himanshu Madhani

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=54C75BAD.3080209@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=quinn.tran@qlogic.com \
    --cc=saurav.kashyap@qlogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.