diff mbox series

[10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs

Message ID 5cc329185c0b92f3aad001fc1afa54996a2c1112.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:27 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 "!!! 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/bfa/bfa_fcs_lport.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Gustavo A. R. Silva Dec. 19, 2018, 3:39 p.m. UTC | #1
Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:27 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 "!!! 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/bfa/bfa_fcs_lport.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
> index b4f2c1d8742e..646f09f66443 100644
> --- a/drivers/scsi/bfa/bfa_fcs_lport.c
> +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
> @@ -6430,9 +6430,7 @@ bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
>   	switch (event) {
>   	case BFA_FCS_VPORT_SM_OFFLINE:
>   		bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
> -		/*
> -		 * !!! fall through !!!
> -		 */
> +		/* fall through */
>   
>   	case BFA_FCS_VPORT_SM_RSP_OK:
>   	case BFA_FCS_VPORT_SM_RSP_ERROR:
> @@ -6458,9 +6456,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
>   	switch (event) {
>   	case BFA_FCS_VPORT_SM_OFFLINE:
>   		bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
> -		/*
> -		 * !!! fall through !!!
> -		 */
> +		/* fall through */
>   
>   	case BFA_FCS_VPORT_SM_RSP_OK:
>   	case BFA_FCS_VPORT_SM_RSP_ERROR:
>
Gustavo A. R. Silva Jan. 10, 2019, 8:12 p.m. UTC | #2
Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
> 
> Friendly ping:
> 
> Who can ack or review this patch, please?
> 
> Thanks
> -- 
> Gustavo
> 
> On 11/27/18 10:27 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 "!!! 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/bfa/bfa_fcs_lport.c | 8 ++------
>>   1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
>> index b4f2c1d8742e..646f09f66443 100644
>> --- a/drivers/scsi/bfa/bfa_fcs_lport.c
>> +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
>> @@ -6430,9 +6430,7 @@ bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
>>       switch (event) {
>>       case BFA_FCS_VPORT_SM_OFFLINE:
>>           bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case BFA_FCS_VPORT_SM_RSP_OK:
>>       case BFA_FCS_VPORT_SM_RSP_ERROR:
>> @@ -6458,9 +6456,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
>>       switch (event) {
>>       case BFA_FCS_VPORT_SM_OFFLINE:
>>           bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case BFA_FCS_VPORT_SM_RSP_OK:
>>       case BFA_FCS_VPORT_SM_RSP_ERROR:
>>
Sudarsana Reddy Kalluru Jan. 11, 2019, 6:33 a.m. UTC | #3
-----Original Message-----
From: Gustavo A. R. Silva [mailto:gustavo@embeddedor.com] 
Sent: 11 January 2019 01:42
To: Anil Gurumurthy <anil.gurumurthy@qlogic.com>; Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Cc: James E.J. Bottomley <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com>; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs

External Email

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 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 "!!! 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/bfa/bfa_fcs_lport.c | 8 ++------
>>   1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c 
>> b/drivers/scsi/bfa/bfa_fcs_lport.c
>> index b4f2c1d8742e..646f09f66443 100644
>> --- a/drivers/scsi/bfa/bfa_fcs_lport.c
>> +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
>> @@ -6430,9 +6430,7 @@ bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
>>       switch (event) {
>>       case BFA_FCS_VPORT_SM_OFFLINE:
>>           bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case BFA_FCS_VPORT_SM_RSP_OK:
>>       case BFA_FCS_VPORT_SM_RSP_ERROR:
>> @@ -6458,9 +6456,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
>>       switch (event) {
>>       case BFA_FCS_VPORT_SM_OFFLINE:
>>           bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case BFA_FCS_VPORT_SM_RSP_OK:
>>       case BFA_FCS_VPORT_SM_RSP_ERROR:
>>

Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Martin K. Petersen Jan. 12, 2019, 2:48 a.m. UTC | #4
Gustavo,

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.

Applied this and two other bfa patches to 5.1/scsi-queue.
diff mbox series

Patch

diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
index b4f2c1d8742e..646f09f66443 100644
--- a/drivers/scsi/bfa/bfa_fcs_lport.c
+++ b/drivers/scsi/bfa/bfa_fcs_lport.c
@@ -6430,9 +6430,7 @@  bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
 	switch (event) {
 	case BFA_FCS_VPORT_SM_OFFLINE:
 		bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
-		/*
-		 * !!! fall through !!!
-		 */
+		/* fall through */
 
 	case BFA_FCS_VPORT_SM_RSP_OK:
 	case BFA_FCS_VPORT_SM_RSP_ERROR:
@@ -6458,9 +6456,7 @@  bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
 	switch (event) {
 	case BFA_FCS_VPORT_SM_OFFLINE:
 		bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
-		/*
-		 * !!! fall through !!!
-		 */
+		/* fall through */
 
 	case BFA_FCS_VPORT_SM_RSP_OK:
 	case BFA_FCS_VPORT_SM_RSP_ERROR: