diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2019-01-02 17:18:43 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-02-11 17:53:13 +0000 |
commit | fe201363c7146ba2b22fa023ce08b1eae95bc534 (patch) | |
tree | 5687171abf85af2c42bf2eb956450da4516dbfec /arch | |
parent | 46035d00aa11712b83081ee514f46351a2deeac3 (diff) | |
download | linux-stable-fe201363c7146ba2b22fa023ce08b1eae95bc534.tar.gz linux-stable-fe201363c7146ba2b22fa023ce08b1eae95bc534.tar.bz2 linux-stable-fe201363c7146ba2b22fa023ce08b1eae95bc534.zip |
x86/boot: eboot.c: Include string function declarations
The earliest boot code has its own string functions, since it can't
use those included in the main kernel image. Under some compiler
versions eboot.c fails to include a suitable declaration, resulting in
the warning:
In file included from arch/x86/boot/compressed/eboot.c:287:0:
arch/x86/boot/compressed/../../../../drivers/firmware/efi/efi-stub-helper.c: In function 'efi_relocate_kernel':
>> arch/x86/boot/compressed/../../../../drivers/firmware/efi/efi-stub-helper.c:566:2: warning: implicit declaration of function 'memcpy'; did you mean 'memchr'? [-Wimplicit-function-declaration]
memcpy((void *)new_addr, (void *)cur_image_addr, image_size);
^~~~~~
memchr
Include "../string.h" which provides the correct declarations. This
was done upstream as part of commit 393f203f5fd5 "x86_64: kasan: add
interceptors for memset/memmove/memcpy functions".
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/boot/compressed/eboot.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index a1f905ca1c48..b5577acef092 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -13,8 +13,7 @@ #include <asm/setup.h> #include <asm/desc.h> -#undef memcpy /* Use memcpy from misc.c */ - +#include "../string.h" #include "eboot.h" static efi_system_table_t *sys_table; |