• Gustavo A. R. Silva's avatar
    firewire: mark expected switch fall-throughs · eba6120d
    Gustavo A. R. Silva authored
    In preparation to enabling -Wimplicit-fallthrough, mark switch
    cases where we are expecting to fall through.
    
    This patch fixes the following warnings:
    
    drivers/firewire/core-device.c: In function ‘set_broadcast_channel’:
    drivers/firewire/core-device.c:969:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
        if (data & cpu_to_be32(1 << 31)) {
           ^
    drivers/firewire/core-device.c:974:3: note: here
       case RCODE_ADDRESS_ERROR:
       ^~~~
    drivers/firewire/core-iso.c: In function ‘manage_channel’:
    drivers/firewire/core-iso.c:308:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
        if ((data[0] & bit) == (data[1] & bit))
           ^
    drivers/firewire/core-iso.c:312:3: note: here
       default:
       ^~~~~~~
    drivers/firewire/core-topology.c: In function ‘count_ports’:
    drivers/firewire/core-topology.c:69:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
        (*child_port_count)++;
        ~~~~~~~~~~~~~~~~~~~^~
    drivers/firewire/core-topology.c:70:3: note: here
       case SELFID_PORT_PARENT:
       ^~~~
    
    Warning level 3 was used: -Wimplicit-fallthrough=3
    
    Notice that in some cases, the code comment is modified in
    accordance with what GCC is expecting to find.
    
    This patch is part of the ongoing efforts to enable
    -Wimplicit-fallthrough.
    
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Mathieu Malaterre <malat@debian.org>
    Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (reworded a comment)
    Signed-off-by: 's avatarGustavo A. R. Silva <gustavo@embeddedor.com>
    eba6120d
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
core-card.c Loading commit data...
core-cdev.c Loading commit data...
core-device.c Loading commit data...
core-iso.c Loading commit data...
core-topology.c Loading commit data...
core-transaction.c Loading commit data...
core.h Loading commit data...
init_ohci1394_dma.c Loading commit data...
net.c Loading commit data...
nosy-user.h Loading commit data...
nosy.c Loading commit data...
nosy.h Loading commit data...
ohci.c Loading commit data...
ohci.h Loading commit data...
sbp2.c Loading commit data...