diff mbox series

[01/41] scsi: BusLogic: mark expected switch fall-through

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

Commit Message

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

Addresses-Coverity-ID: 1056537 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/scsi/BusLogic.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Khalid Aziz Dec. 3, 2018, 6:33 p.m. UTC | #1
On 11/27/18 9:21 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 1056537 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/scsi/BusLogic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index 9cee941f97d6..717eef3ee893 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -2641,6 +2641,7 @@ static int blogic_resultcode(struct blogic_adapter *adapter,
>  	case BLOGIC_BAD_CMD_PARAM:
>  		blogic_warn("BusLogic Driver Protocol Error 0x%02X\n",
>  				adapter, adapter_status);
> +		/* fall through */
>  	case BLOGIC_DATA_UNDERRUN:
>  	case BLOGIC_DATA_OVERRUN:
>  	case BLOGIC_NOEXPECT_BUSFREE:
> 

Looks good.

Acked-by: Khalid Aziz <khalid@gonehiking.org>
Martin K. Petersen Dec. 8, 2018, 2:35 a.m. UTC | #2
Gustavo A.,

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

Applied to 4.21/scsi-queue, thanks.
diff mbox series

Patch

diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index 9cee941f97d6..717eef3ee893 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -2641,6 +2641,7 @@  static int blogic_resultcode(struct blogic_adapter *adapter,
 	case BLOGIC_BAD_CMD_PARAM:
 		blogic_warn("BusLogic Driver Protocol Error 0x%02X\n",
 				adapter, adapter_status);
+		/* fall through */
 	case BLOGIC_DATA_UNDERRUN:
 	case BLOGIC_DATA_OVERRUN:
 	case BLOGIC_NOEXPECT_BUSFREE: