From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: dgilbert@interlog.com, linux-scsi@vger.kernel.org,
Nicholas Bellinger <nab@linux-iscsi.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: scsi_debug: support scsi-mq, queues and locks
Date: Thu, 31 Jul 2014 14:52:38 +0400 [thread overview]
Message-ID: <1406803958.6957.2.camel@jarvis> (raw)
In-Reply-To: <20140731091028.GA29976@mwanda>
On Thu, 2014-07-31 at 12:10 +0300, Dan Carpenter wrote:
> [ This is not really a new bug, it's just that renaming the function
> made it show up as a new bug and I figured maybe you know what's going
> on since you are working with related code. -dan ]
>
> Hello Douglas Gilbert,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch cbf67842c3d9: "scsi_debug: support scsi-mq, queues and
> locks" from Jul 26, 2014, leads to the following Smatch complaint:
>
> drivers/scsi/scsi_debug.c:4153 scsi_debug_queuecommand()
> error: we previously assumed 'cmd' could be null (see line 4106)
>
> drivers/scsi/scsi_debug.c
> 4105 if ((SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) &&
> 4106 !(SCSI_DEBUG_OPT_NO_CDB_NOISE & scsi_debug_opts) && cmd) {
> ^^^
> Check.
This check is bogus. cmd comes from
int scsi_debug_queuecommand_lck(struct scsi_cmnd *SCpnt, done_funct_t
done)
{
unsigned char *cmd = (unsigned char *) SCpnt->cmnd;
which can never be NULL (cast is pointless as well, it's already an
unsigned char *).
James
prev parent reply other threads:[~2014-07-31 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 9:10 scsi_debug: support scsi-mq, queues and locks Dan Carpenter
2014-07-31 10:52 ` James Bottomley [this message]
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=1406803958.6957.2.camel@jarvis \
--to=james.bottomley@hansenpartnership.com \
--cc=dan.carpenter@oracle.com \
--cc=dgilbert@interlog.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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;
as well as URLs for NNTP newsgroup(s).