All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, Hannes Reinecke <hare@suse.com>,
	"Artur Paszkiewicz" <artur.paszkiewicz@intel.com>,
	Jack Wang <jinpu.wang@cloud.ionos.com>,
	Jason Yan <yanaijie@huawei.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Tom Rix <trix@redhat.com>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Luo Jiaxing <luojiaxing@huawei.com>,
	"Jolly Shah" <jollys@google.com>,
	Liu Shixin <liushixin2@huawei.com>,
	Colin Ian King <colin.king@canonical.com>,
	"Ahmed S. Darwish" <a.darwish@linutronix.de>
Subject: Re: [PATCH v2 1/3] libsas: Introduce more SAM status code aliases in enum exec_status
Date: Wed, 19 May 2021 10:38:23 +0100	[thread overview]
Message-ID: <87680d53-6af9-81bd-88e0-fd331776d4dc@huawei.com> (raw)
In-Reply-To: <20210518175006.21308-2-bvanassche@acm.org>

On 18/05/2021 18:50, Bart Van Assche wrote:
> index 9271d7a49b90..e68327fa4835 100644
> --- a/include/scsi/libsas.h
> +++ b/include/scsi/libsas.h
> @@ -474,10 +474,16 @@ enum service_response {
>   };
>   
>   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
> +	/*
> +	 * Values 0..0x7f 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 needs an alias with the SAS_
> +	 * prefix here.
>   	 */
> -	__SAM_STAT_CHECK_CONDITION = SAM_STAT_CHECK_CONDITION,
> +	SAS_STAT_GOOD = SAM_STAT_GOOD,
> +	SAS_STAT_BUSY = SAM_STAT_BUSY,
> +	SAS_STAT_TASK_ABORTED = SAM_STAT_TASK_ABORTED,
> +	SAS_STAT_CHECK_CONDITION = SAM_STAT_CHECK_CONDITION,
>   

Personally I prefer SAS_SAM_STAT_xxx, as Christoph mentioned in v1. This 
helps us know the SAS error codes are aliased from the SAM error codes. 
And only SAS_STAT_CHECK_CONDITION becomes long, with that suggestion.

I know that you did ask about this solution in v1 series, without reply 
- sorry.

Ignoring this preference, it looks ok:
Reviewed-by: John Garry <john.garry@huawei.com>

  parent reply	other threads:[~2021-05-19  9:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 17:50 [PATCH v2 0/3] Introduce enums for SCSI status codes Bart Van Assche
2021-05-18 17:50 ` [PATCH v2 1/3] libsas: Introduce more SAM status code aliases in enum exec_status Bart Van Assche
2021-05-19  6:10   ` Jinpu Wang
2021-05-19  9:38   ` John Garry [this message]
2021-05-18 17:50 ` [PATCH v2 2/3] Introduce enums for the SAM, message, host and driver status codes Bart Van Assche
2021-05-19 11:23   ` John Garry
2021-05-19 15:47     ` Bart Van Assche
2021-05-18 17:50 ` [PATCH v2 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=87680d53-6af9-81bd-88e0-fd331776d4dc@huawei.com \
    --to=john.garry@huawei.com \
    --cc=a.darwish@linutronix.de \
    --cc=artur.paszkiewicz@intel.com \
    --cc=bvanassche@acm.org \
    --cc=colin.king@canonical.com \
    --cc=gustavoars@kernel.org \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=jollys@google.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    --cc=luojiaxing@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=trix@redhat.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 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.