Skip to contentSkip to conversation

dmaengine: nbpfaxi: mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Oct 13, 2017 – Oct 16, 2017 dmaengine

lore
Share & tools
lore
#0 lore raw

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
index d3f918a..68a3a83 100644
@@ -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;
 	}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines · Gustavo A. R. Silva

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 +0 -0
index d3f918a..68a3a83 100644

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 */

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

Quoted 6 lines
drivers/dma/nbpfaxi.c +0 -0
 	case DMA_SLAVE_BUSWIDTH_1_BYTE:
 		size = burst;
 	}
Signature · 1 line
2.7.4
Signature · 1 line
~Vinod