From: Martin Wilck <mwilck@suse.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>,
"hare@suse.de" <hare@suse.de>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
"xose.vazquez@gmail.com" <xose.vazquez@gmail.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi: handle special return codes for ABORTED COMMAND
Date: Tue, 30 Jan 2018 01:01:39 +0100 [thread overview]
Message-ID: <1517270499.12805.33.camel@suse.com> (raw)
In-Reply-To: <1517269153.2687.61.camel@wdc.com>
On Mon, 2018-01-29 at 23:39 +0000, Bart Van Assche wrote:
> On Tue, 2018-01-30 at 00:30 +0100, Martin Wilck wrote:
> > + static struct aborted_cmd_blist blist[] = {
>
> Please consider to declare this array const.
That doesn't work because I want to store the "warned" flag in it. And
I think it'd be good to print one message per asc/ascq combination,
rather than just having a single static "warned" variable.
> > + for (i = 0; i < sizeof(blist)/sizeof(struct
> > aborted_cmd_blist); i++) {
>
> Have you considered to use ARRAY_SIZE()?
No. Thanks for the hint. I'll re-post.
Martin
--
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
prev parent reply other threads:[~2018-01-30 0:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 23:30 [PATCH] scsi: handle special return codes for ABORTED COMMAND Martin Wilck
2018-01-29 23:39 ` Bart Van Assche
2018-01-30 0:01 ` Martin Wilck [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=1517270499.12805.33.camel@suse.com \
--to=mwilck@suse.com \
--cc=Bart.VanAssche@wdc.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=xose.vazquez@gmail.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