From: Hannes Reinecke <hare@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>,
"James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [patch] scsi: missing braces in scsi_extd_sense_format()
Date: Thu, 06 Nov 2014 07:53:20 +0100 [thread overview]
Message-ID: <545B1AE0.9000407@suse.de> (raw)
In-Reply-To: <20141105203837.GA26314@mwanda>
On 11/05/2014 09:38 PM, Dan Carpenter wrote:
> There were missing curly braces so we always return the first
> additional2[] string.
>
> Fixes: 7046d2fa6dbd ('scsi: use sdev as argument for sense code printing')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
> index a1a7fca..0cf43f6 100644
> --- a/drivers/scsi/constants.c
> +++ b/drivers/scsi/constants.c
> @@ -1282,9 +1282,10 @@ scsi_extd_sense_format(unsigned char asc, unsigned char ascq, const char **fmt)
> for (i = 0; additional2[i].fmt; i++) {
> if (additional2[i].code1 == asc &&
> ascq >= additional2[i].code2_min &&
> - ascq <= additional2[i].code2_max)
> + ascq <= additional2[i].code2_max) {
> *fmt = additional2[i].fmt;
> return additional2[i].str;
> + }
> }
> #endif
> return NULL;
>
D'oh.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-11-06 6:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 20:38 [patch] scsi: missing braces in scsi_extd_sense_format() Dan Carpenter
2014-11-06 6:39 ` Christoph Hellwig
2014-11-06 6:53 ` Hannes Reinecke [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=545B1AE0.9000407@suse.de \
--to=hare@suse.de \
--cc=JBottomley@parallels.com \
--cc=dan.carpenter@oracle.com \
--cc=hch@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).