diff mbox

dmaengine: nbpfaxi: mark expected switch fall-through

Message ID 20171013201719.GA7498@embeddedor.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Gustavo A. R. Silva Oct. 13, 2017, 8:17 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/dma/nbpfaxi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Vinod Koul Oct. 16, 2017, 6:48 a.m. UTC | #1
On Fri, Oct 13, 2017 at 03:17:19PM -0500, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  drivers/dma/nbpfaxi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
> index d3f918a..68a3a83 100644
> --- a/drivers/dma/nbpfaxi.c
> +++ b/drivers/dma/nbpfaxi.c
> @@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
>  
>  	default:
>  		pr_warn("%s(): invalid bus width %u\n", __func__, width);
> +		/* fall through */

can we add more details why we are falling thru and why this value is sane
default..

>  	case DMA_SLAVE_BUSWIDTH_1_BYTE:
>  		size = burst;
>  	}
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index d3f918a..68a3a83 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -479,6 +479,7 @@  static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
 
 	default:
 		pr_warn("%s(): invalid bus width %u\n", __func__, width);
+		/* fall through */
 	case DMA_SLAVE_BUSWIDTH_1_BYTE:
 		size = burst;
 	}