From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Hannes Reinecke <hare@suse.com>,
John Garry <john.garry@huawei.com>,
Artur Paszkiewicz <artur.paszkiewicz@intel.com>,
Jack Wang <jinpu.wang@cloud.ionos.com>,
Jason Yan <yanaijie@huawei.com>
Subject: Re: [PATCH 1/3] libsas: Introduce more SAM status code aliases in enum exec_status
Date: Sat, 15 May 2021 08:44:07 +0200 [thread overview]
Message-ID: <20210515064407.GB26545@lst.de> (raw)
In-Reply-To: <20210514232308.7826-2-bvanassche@acm.org>
> index 9271d7a49b90..9b17f7c8c314 100644
> --- a/include/scsi/libsas.h
> +++ b/include/scsi/libsas.h
> @@ -477,6 +477,9 @@ enum exec_status {
> /* The SAM_STAT_.. codes fit in the lower 6 bits, alias some of
> * them here to silence 'case value not in enumerated type' warnings
> */
> + __SAM_STAT_GOOD = SAM_STAT_GOOD,
> + __SAM_STAT_BUSY = SAM_STAT_BUSY,
> + __SAM_STAT_TASK_ABORTED = SAM_STAT_TASK_ABORTED,
> __SAM_STAT_CHECK_CONDITION = SAM_STAT_CHECK_CONDITION,
I don't think the (existing) naming and comment are very helpful here.
I'd so a s/__SAM_/SAS_SAM_/
and replace the comment with something like:
/*
* The first 6 bytes are used to return the SAM_STAT_* codes. To avoid
* 'case value not in enumerated type' compiler warnings every value
* returned through the exec_status enum will need an alias with
* the SAS_ prefix here.
*/
SAS_SAM_STAT_GOOD = SAM_STAT_GOOD,
SAS_SAM_STAT_BUSY = SAM_STAT_BUSY,
...
next prev parent reply other threads:[~2021-05-15 6:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 23:23 [PATCH 0/3] Introduce enums for SCSI status codes Bart Van Assche
2021-05-14 23:23 ` [PATCH 1/3] libsas: Introduce more SAM status code aliases in enum exec_status Bart Van Assche
2021-05-15 6:44 ` Christoph Hellwig [this message]
2021-05-17 15:45 ` Bart Van Assche
2021-05-14 23:23 ` [PATCH 2/3] Introduce enums for the SAM, message, host and driver status codes Bart Van Assche
2021-05-17 10:38 ` John Garry
2021-05-17 15:12 ` Bart Van Assche
2021-05-14 23:23 ` [PATCH 3/3] Change the type of the second argument of scsi_host_complete_all_commands() Bart Van Assche
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=20210515064407.GB26545@lst.de \
--to=hch@lst.de \
--cc=artur.paszkiewicz@intel.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.com \
--cc=jinpu.wang@cloud.ionos.com \
--cc=john.garry@huawei.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=yanaijie@huawei.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