Skip to content

Commit 92bf501

Browse files
GustavoARSilvatorvalds
authored andcommitted
rapidio/mport_cdev: mark expected switch fall-through
In preparation for enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/rapidio/devices/rio_mport_cdev.c: In function `mport_release_mapping': drivers/rapidio/devices/rio_mport_cdev.c:2151:3: warning: this statement may fall through [-Wimplicit-fallthrough=] rio_unmap_inb_region(mport, map->phys_addr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC drivers/regulator/fixed-helper.o CC drivers/pinctrl/stm32/pinctrl-stm32f429.o drivers/rapidio/devices/rio_mport_cdev.c:2152:2: note: here case MAP_DMA: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Link: http://lkml.kernel.org/r/20190212175014.GA14326@embeddedor Signed-off-by: Gustavo A. R. Silva <[email protected]> Acked-by: Alexandre Bounine <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 5ac188b commit 92bf501

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/rapidio/devices/rio_mport_cdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,6 +2149,7 @@ static void mport_release_mapping(struct kref *ref)
21492149
switch (map->dir) {
21502150
case MAP_INBOUND:
21512151
rio_unmap_inb_region(mport, map->phys_addr);
2152+
/* fall through */
21522153
case MAP_DMA:
21532154
dma_free_coherent(mport->dev.parent, map->size,
21542155
map->virt_addr, map->phys_addr);

0 commit comments

Comments
 (0)