]> git.baikalelectronics.ru Git - kernel.git/commit
ELF, uapi: fixup ELF_ST_TYPE definition
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 13 May 2022 03:38:36 +0000 (20:38 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 13 May 2022 03:38:36 +0000 (20:38 -0700)
commit0ba7bec4b653c9095bfe07e749d91ae48c0e1ef8
tree49a318fdfc8471ab9957fc2b0be8122ac16eba57
parent737314c8e43689807a37367afe678cd0c6a35f48
ELF, uapi: fixup ELF_ST_TYPE definition

This is very theoretical compile failure:

ELF_ST_TYPE(st_info = A)

Cast will bind first and st_info will stop being lvalue:

error: lvalue required as left operand of assignment

Given that the only use of this macro is

ELF_ST_TYPE(sym->st_info)

where st_info is "unsigned char" I've decided to remove cast especially
given that companion macro ELF_ST_BIND doesn't use cast.

Link: https://lkml.kernel.org/r/Ymv7G1BeX4kt3obz@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/uapi/linux/elf.h