Files
linux/kernel
Nathan Chancellor b6f89e9a17 kernel/extable.c: use address-of operator on section symbols
commit 63174f61df upstream.

Clang warns:

../kernel/extable.c:37:52: warning: array comparison always evaluates to
a constant [-Wtautological-compare]
        if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) {
                                                          ^
1 warning generated.

These are not true arrays, they are linker defined symbols, which are just
addresses.  Using the address of operator silences the warning and does
not change the resulting assembly with either clang/ld.lld or gcc/ld
(tested with diff + objdump -Dr).

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/892
Link: http://lkml.kernel.org/r/20200219202036.45702-1-natechancellor@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-17 08:43:46 +09:00
..
2023-11-17 08:42:20 +09:00
2019-12-13 08:51:11 +01:00
2019-12-01 09:17:17 +01:00
2020-04-29 19:16:15 +02:00
2021-09-25 14:26:55 +02:00
2020-01-15 14:51:23 +00:00
2023-11-17 08:42:35 +09:00
2020-03-25 08:06:13 +01:00
2019-08-12 13:36:37 -04:00
2021-02-07 14:48:38 +01:00
2020-01-09 10:18:59 +01:00
2019-03-06 15:59:21 +00:00