dmaengine: nbpfaxi: Mark expected switch fall-through
PATCH 1/1 dmaengine: nbpfaxi: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
--- drivers/dma/nbpfaxi.c | 1 + 1 file changed, 1 insertion(+)
drivers/dma/nbpfaxi.c +1 -0
@@ -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; }
Vinod
maintainerQuoted 13 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/dma/nbpfaxi.c | 1 + 1 file changed, 1 insertion(+)drivers/dma/nbpfaxi.c +0
-0
drivers/dma/nbpfaxi.c static size_t nbpf_xfer_size(struct nbpf_device *nbpf, · line 482
Quoted 4 lines
drivers/dma/nbpfaxi.c +1
-0@@ -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 */
Hmm this looks okay but am not able to trigger this warning..(used W=1) Did you see this warning on your build, if so what options?
Hi Vinod,
Quoted 15 lines · Vinod
Quoted 14 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/dma/nbpfaxi.c | 1 + 1 file changed, 1 insertion(+)drivers/dma/nbpfaxi.c +0
-0@@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,
Quoted 7 lines
drivers/dma/nbpfaxi.c static size_t nbpf_xfer_size(struct nbpf_device *nbpf, · line 482
Quoted 3 lines
drivers/dma/nbpfaxi.c +1
-0default :pr_warn ("%s(): invalid bus width %u\n" , __func__, width); +/* fall through */ Hmm this looks okay but am not able to trigger this warning..(used W=1) Did you see this warning on your build, if so what options?
Add this to your Makefile:
KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=2)
Thanks
---
Gustavo
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Vinod
maintainerQuoted 25 lines · Gustavo A. R. Silva
Hi Vinod,
Quoted 15 lines · Vinod
Quoted 14 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/dma/nbpfaxi.c | 1 + 1 file changed, 1 insertion(+)drivers/dma/nbpfaxi.c +0
-0@@ -479,6 +479,7 @@ static size_t nbpf_xfer_size(struct nbpf_device *nbpf,Quoted 6 lines
drivers/dma/nbpfaxi.c static size_t nbpf_xfer_size(struct nbpf_device *nbpf, · line 482
Quoted 3 lines
drivers/dma/nbpfaxi.c +1
-0default :pr_warn ("%s(): invalid bus width %u\n" , __func__, width); +/* fall through */ Hmm this looks okay but am not able to trigger this warning..(used W=1) Did you see this warning on your build, if so what options?
Quoted 3 lines
Add this to your
Makefile:
KBUILD_CFLAGS+= $(call cc-option,-Wimplicit-fallthrough=2)
Thanks, that did it..
Applied now thanks