android_kernel_oneplus_msm8998/tools/include/linux
Arnaldo Carvalho de Melo e1b7b00a1b tools include: Add a __fallthrough statement
commit b5bf1733d6a391c4e90ea8f8468d83023be74a2a upstream.

For cases where implicit fall through case labels are intended,
to let us inform that to gcc >= 7:

    CC       /tmp/build/perf/util/string.o
  util/string.c: In function 'perf_atoll':
  util/string.c:22:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
      if (*p)
         ^
  util/string.c:24:3: note: here
     case '\0':
     ^~~~

So we introduce:

  #define __fallthrough __attribute__ ((fallthrough))

And use it in such cases.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: William Cohen <wcohen@redhat.com>
Link: http://lkml.kernel.org/n/tip-qnpig0xfop4hwv6k4mv1wts5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-15 11:57:47 +02:00
..
atomic.h tools include: Add basic atomic.h implementation from the kernel sources 2015-05-08 16:11:05 -03:00
bitops.h tools: Remove bitops/hweight usage of bits in tools/perf 2015-01-16 17:49:29 -03:00
compiler.h tools include: Add a __fallthrough statement 2017-07-15 11:57:47 +02:00
err.h tools: Fix shadowed declaration in err.h 2015-09-30 18:34:22 -03:00
export.h tools: Restore export.h 2015-08-25 09:44:22 +02:00
filter.h perf tools: Copy linux/filter.h to tools/include 2015-09-02 16:30:46 -03:00
hash.h perf tools: Move hash.h header 2014-02-18 09:34:49 -03:00
kernel.h perf tools: Move linux/kernel.h to tools/include 2015-06-02 15:27:04 -03:00
list.h tools include: Add compiler.h to list.h 2015-11-11 18:41:33 -03:00
log2.h give up on gcc ilog2() constant optimizations 2017-03-26 12:13:18 +02:00
poison.h tools: Move tools/perf/util/include/linux/{list.h,poison.h} to tools/include 2015-06-02 19:07:29 -03:00
rbtree.h tools: Move rbtree.h from tools/perf/ 2015-07-05 22:54:01 -03:00
rbtree_augmented.h tools: Copy rbtree_augmented.h from the kernel 2015-07-05 22:59:05 -03:00
types.h tools include: add __aligned_u64 to types.h. 2015-05-18 10:17:32 -03:00