diff mbox

[4/7] dm-mpath: Avoid that building with W=1 causes gcc 7 to complain about fall-through

Message ID 20170809183216.526-5-bart.vanassche@wdc.com (mailing list archive)
State Accepted, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Bart Van Assche Aug. 9, 2017, 6:32 p.m. UTC
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Laurence Oberman <loberman@redhat.com>
---
 drivers/md/dm-mpath.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig Aug. 10, 2017, 9:29 a.m. UTC | #1
On Wed, Aug 09, 2017 at 11:32:13AM -0700, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
> Cc: Laurence Oberman <loberman@redhat.com>
> ---
>  drivers/md/dm-mpath.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 0baa461eccaa..6e20deac4add 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -1379,6 +1379,7 @@ static void pg_init_done(void *data, int errors)
>  	case SCSI_DH_RETRY:
>  		/* Wait before retrying. */
>  		delay_retry = 1;
> +		/* fall through */
>  	case SCSI_DH_IMM_RETRY:
>  	case SCSI_DH_RES_TEMP_UNAVAIL:
>  		if (pg_init_limit_reached(m, pgpath))

I prefer /*FALLTHRU*/ over the less shouty lower case version, but either
way this looks okay:

Reviewed-by: Christoph Hellwig <hch@lst.de>

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 0baa461eccaa..6e20deac4add 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1379,6 +1379,7 @@  static void pg_init_done(void *data, int errors)
 	case SCSI_DH_RETRY:
 		/* Wait before retrying. */
 		delay_retry = 1;
+		/* fall through */
 	case SCSI_DH_IMM_RETRY:
 	case SCSI_DH_RES_TEMP_UNAVAIL:
 		if (pg_init_limit_reached(m, pgpath))