diff mbox series

[36/41] scsi: qla4xxx: ql4_os: mark expected switch fall-through

Message ID a118ae0eeeb3cdcd4846bc1031ea89ca62af1e00.1543374820.git.gustavo@embeddedor.com (mailing list archive)
State Deferred
Headers show
Series scsi: Mark expected switch fall-throughs | expand

Commit Message

Gustavo A. R. Silva Nov. 28, 2018, 4:33 a.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that, in this particular case, I replaced "allow fall-through"
with a "fall through" annotation, which is what GCC is expecting to
find.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gustavo A. R. Silva Dec. 20, 2018, 12:07 a.m. UTC | #1
Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that, in this particular case, I replaced "allow fall-through"
> with a "fall through" annotation, which is what GCC is expecting to
> find.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>   drivers/scsi/qla4xxx/ql4_os.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index 1c702cd22359..7fd3491ea2d9 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -2876,7 +2876,7 @@ static int qla4xxx_session_get_param(struct iscsi_cls_session *cls_sess,
>   						chap_tbl.secret_len);
>   			}
>   		}
> -		/* allow fall-through */
> +		/* fall through */
>   	default:
>   		return iscsi_session_get_param(cls_sess, param, buf);
>   	}
>
Nilesh Javali Dec. 24, 2018, 9:01 a.m. UTC | #2
On 11/28/18, 10:03 AM, "linux-scsi-owner@vger.kernel.org on behalf of
Gustavo A. R. Silva" <linux-scsi-owner@vger.kernel.org on behalf of
gustavo@embeddedor.com> wrote:

>External Email
>
>In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>where we are expecting to fall through.
>
>Notice that, in this particular case, I replaced "allow fall-through"
>with a "fall through" annotation, which is what GCC is expecting to
>find.
>
>Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>---
> drivers/scsi/qla4xxx/ql4_os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
>index 1c702cd22359..7fd3491ea2d9 100644
>--- a/drivers/scsi/qla4xxx/ql4_os.c
>+++ b/drivers/scsi/qla4xxx/ql4_os.c
>@@ -2876,7 +2876,7 @@ static int qla4xxx_session_get_param(struct
>iscsi_cls_session *cls_sess,
>                                                chap_tbl.secret_len);
>                        }
>                }
>-               /* allow fall-through */
>+               /* fall through */
>        default:
>                return iscsi_session_get_param(cls_sess, param, buf);
>        }
>--
>2.17.1

Thanks.
Acked-by: Nilesh Javali <njavali@marvell.com>
Martin K. Petersen Jan. 12, 2019, 2:05 a.m. UTC | #3
Nilesh,

>>In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>>where we are expecting to fall through.
>>
>>Notice that, in this particular case, I replaced "allow fall-through"
>>with a "fall through" annotation, which is what GCC is expecting to
>>find.

Applied to 5.1/scsi-queue. Thanks, Gustavo.
diff mbox series

Patch

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 1c702cd22359..7fd3491ea2d9 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -2876,7 +2876,7 @@  static int qla4xxx_session_get_param(struct iscsi_cls_session *cls_sess,
 						chap_tbl.secret_len);
 			}
 		}
-		/* allow fall-through */
+		/* fall through */
 	default:
 		return iscsi_session_get_param(cls_sess, param, buf);
 	}