Skip to content

Commit

Permalink
mirror: Update "fallthrough" keyword definition
Browse files Browse the repository at this point in the history
To align on the rest of the kernel code, we updated the "__fallthrough"
keyword into simply "fallthrough". The change needs the corresponding
definition in the headers.

Signed-off-by: Quentin Monnet <[email protected]>
  • Loading branch information
qmonnet committed Aug 29, 2023
1 parent 5dc1ec5 commit 654895b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
+ __GNUC_PATCHLEVEL__)
#endif

#if GCC_VERSION >= 70000 && !defined(__CHECKER__)
# define __fallthrough __attribute__ ((fallthrough))
#if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
#else
# define fallthrough do {} while (0) /* fallthrough */
#endif

#if __has_attribute(__error__)
Expand Down
4 changes: 0 additions & 4 deletions include/linux/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,4 @@
# define __weak __attribute__((weak))
#endif

#ifndef __fallthrough
# define __fallthrough
#endif

#endif

0 comments on commit 654895b

Please sign in to comment.