• Gustavo A. R. Silva's avatar
    mtd: cfi_cmdset_0002: Mark expected switch fall-throughs · af5d44b0
    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/mtd/chips/cfi_cmdset_0002.c: In function ‘get_chip’:
    drivers/mtd/chips/cfi_cmdset_0002.c:870:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
       if (mode == FL_READY && chip->oldstate == FL_READY)
          ^
    drivers/mtd/chips/cfi_cmdset_0002.c:873:2: note: here
      default:
      ^~~~~~~
    drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘cfi_amdstd_sync’:
    drivers/mtd/chips/cfi_cmdset_0002.c:2745:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
        chip->state = FL_SYNCING;
        ~~~~~~~~~~~~^~~~~~~~~~~~
    drivers/mtd/chips/cfi_cmdset_0002.c:2750:3: note: here
       case FL_SYNCING:
       ^~~~
    
    Warning level 3 was used: -Wimplicit-fallthrough=3
    
    This patch is part of the ongoing efforts to enabling
    -Wimplicit-fallthrough.
    Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
    Reviewed-by: default avatarTokunori Ikegami <ikegami.t@gmail.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    af5d44b0
cfi_cmdset_0002.c 79.2 KB