ARC: kgdb: add 'fallthrough' to prevent a warning
authorRandy Dunlap <rdunlap@infradead.org>
Thu, 22 Apr 2021 05:16:53 +0000 (22:16 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 10 May 2021 19:38:59 +0000 (12:38 -0700)
Use the 'fallthrough' macro to document that this switch case
does indeed fall through to the next case.

../arch/arc/kernel/kgdb.c: In function 'kgdb_arch_handle_exception':
../arch/arc/kernel/kgdb.c:141:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  141 |   if (kgdb_hex2long(&ptr, &addr))
      |      ^
../arch/arc/kernel/kgdb.c:144:2: note: here
  144 |  case 'D':
      |  ^~~~

Cc: linux-snps-arc@lists.infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/kgdb.c

index ecfbc42..345a000 100644 (file)
@@ -140,6 +140,7 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
                ptr = &remcomInBuffer[1];
                if (kgdb_hex2long(&ptr, &addr))
                        regs->ret = addr;
+               fallthrough;
 
        case 'D':
        case 'k':