OpenCloudOS-Kernel/scripts/mod
Masahiro Yamada 68fef6704e modpost: squash if...else-if in find_elf_symbol2()
if ((addr - sym->st_value) < distance) {
            distance = addr - sym->st_value;
            near = sym;
    } else if ((addr - sym->st_value) == distance) {
            near = sym;
    }

is equivalent to:

    if (addr - sym->st_value <= distance) {
            distance = addr - sym->st_value;
            near = sym;
    }

(The else-if block can overwrite 'distance' with the same value).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2022-05-27 16:16:35 +09:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Makefile scripts/mod: disable LTO for empty.c 2021-01-14 08:21:09 -08:00
devicetable-offsets.c HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE() 2021-11-09 11:41:46 +01:00
empty.c
file2alias.c modpost: reuse ARRAY_SIZE() macro for section_mismatch() 2022-05-27 16:15:40 +09:00
list.h modpost: import include/linux/list.h 2022-05-08 03:17:00 +09:00
mk_elfconfig.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
modpost.c modpost: squash if...else-if in find_elf_symbol2() 2022-05-27 16:16:35 +09:00
modpost.h modpost: reuse ARRAY_SIZE() macro for section_mismatch() 2022-05-27 16:15:40 +09:00
sumversion.c modpost: use bool type where appropriate 2022-05-08 03:17:00 +09:00