From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [kees:kspp/memcpy/next-20210618/v0 81/82] arch/arm/boot/compressed/string.c:29:7: error: redefinition of parameter '__builtin_object_size'
Date: Sun, 20 Jun 2021 04:43:13 +0800 [thread overview]
Message-ID: <202106200409.iWMjumpZ-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 13148 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210618/v0
head: fd2aa2a169de8bde9502e7a2fc48cd03d4bfd996
commit: 6d805912063804ea975440760b79392fc0c03948 [81/82] fortify: Work around Clang inlining bugs
config: arm-randconfig-r024-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d1baf2895467735ab14f4b3415fce204c0cc8e7f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=6d805912063804ea975440760b79392fc0c03948
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210618/v0
git checkout 6d805912063804ea975440760b79392fc0c03948
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> arch/arm/boot/compressed/string.c:29:7: error: expected parameter declarator
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:304:32: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: error: expected ')'
include/linux/fortify-string.h:304:32: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:29:7: note: to match this '('
include/linux/fortify-string.h:304:28: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: warning: declaration specifier missing, defaulting to 'int'
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:304:7: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: error: expected parameter declarator
include/linux/fortify-string.h:305:32: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:29:7: error: expected ')'
include/linux/fortify-string.h:305:32: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:29:7: note: to match this '('
include/linux/fortify-string.h:305:28: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:29:7: warning: declaration specifier missing, defaulting to 'int'
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:305:7: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:29:7: error: redefinition of parameter '__builtin_object_size'
include/linux/fortify-string.h:305:7: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:29:7: note: previous declaration is here
include/linux/fortify-string.h:304:7: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
^
>> arch/arm/boot/compressed/string.c:29:7: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]
void *memcpy(void *__dest, __const void *__src, size_t __n)
^
include/linux/fortify-string.h:305:7: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: error: expected parameter declarator
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:316:34: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: error: expected ')'
include/linux/fortify-string.h:316:34: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: note: to match this '('
include/linux/fortify-string.h:316:30: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: warning: declaration specifier missing, defaulting to 'int'
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:316:9: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: error: expected parameter declarator
include/linux/fortify-string.h:317:34: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: error: expected ')'
include/linux/fortify-string.h:317:34: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: note: to match this '('
include/linux/fortify-string.h:317:30: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: warning: declaration specifier missing, defaulting to 'int'
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:317:9: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: error: redefinition of parameter '__builtin_object_size'
include/linux/fortify-string.h:317:9: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
arch/arm/boot/compressed/string.c:63:7: note: previous declaration is here
include/linux/fortify-string.h:316:9: note: expanded from macro 'memmove'
__builtin_object_size(p, 1), \
^
arch/arm/boot/compressed/string.c:63:7: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]
void *memmove(void *__dest, __const void *__src, size_t count)
^
include/linux/fortify-string.h:317:9: note: expanded from macro 'memmove'
__builtin_object_size(q, 1))
^
>> arch/arm/boot/compressed/string.c:72:10: error: too many arguments to function call, expected 1, have 2
return memcpy(__dest, __src, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:304:32: note: expanded from macro 'memcpy'
__builtin_object_size(p, 1), \
~~~~~~~~~~~~~~~~~~~~~ ^
>> arch/arm/boot/compressed/string.c:72:10: error: too many arguments to function call, expected 1, have 2
return memcpy(__dest, __src, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/fortify-string.h:305:32: note: expanded from macro 'memcpy'
__builtin_object_size(q, 1))
~~~~~~~~~~~~~~~~~~~~~ ^
6 warnings and 12 errors generated.
vim +/__builtin_object_size +29 arch/arm/boot/compressed/string.c
d6d51a96c7d63b Linus Walleij 2020-10-25 28
df4879fa2603fb Nicolas Pitre 2011-09-13 @29 void *memcpy(void *__dest, __const void *__src, size_t __n)
df4879fa2603fb Nicolas Pitre 2011-09-13 30 {
df4879fa2603fb Nicolas Pitre 2011-09-13 31 int i = 0;
df4879fa2603fb Nicolas Pitre 2011-09-13 32 unsigned char *d = (unsigned char *)__dest, *s = (unsigned char *)__src;
df4879fa2603fb Nicolas Pitre 2011-09-13 33
df4879fa2603fb Nicolas Pitre 2011-09-13 34 for (i = __n >> 3; i > 0; i--) {
df4879fa2603fb Nicolas Pitre 2011-09-13 35 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 36 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 37 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 38 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 39 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 40 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 41 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 42 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 43 }
df4879fa2603fb Nicolas Pitre 2011-09-13 44
df4879fa2603fb Nicolas Pitre 2011-09-13 45 if (__n & 1 << 2) {
df4879fa2603fb Nicolas Pitre 2011-09-13 46 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 47 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 48 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 49 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 50 }
df4879fa2603fb Nicolas Pitre 2011-09-13 51
df4879fa2603fb Nicolas Pitre 2011-09-13 52 if (__n & 1 << 1) {
df4879fa2603fb Nicolas Pitre 2011-09-13 53 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 54 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 55 }
df4879fa2603fb Nicolas Pitre 2011-09-13 56
df4879fa2603fb Nicolas Pitre 2011-09-13 57 if (__n & 1)
df4879fa2603fb Nicolas Pitre 2011-09-13 58 *d++ = *s++;
df4879fa2603fb Nicolas Pitre 2011-09-13 59
df4879fa2603fb Nicolas Pitre 2011-09-13 60 return __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 61 }
df4879fa2603fb Nicolas Pitre 2011-09-13 62
df4879fa2603fb Nicolas Pitre 2011-09-13 63 void *memmove(void *__dest, __const void *__src, size_t count)
df4879fa2603fb Nicolas Pitre 2011-09-13 64 {
df4879fa2603fb Nicolas Pitre 2011-09-13 65 unsigned char *d = __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 66 const unsigned char *s = __src;
df4879fa2603fb Nicolas Pitre 2011-09-13 67
df4879fa2603fb Nicolas Pitre 2011-09-13 68 if (__dest == __src)
df4879fa2603fb Nicolas Pitre 2011-09-13 69 return __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 70
df4879fa2603fb Nicolas Pitre 2011-09-13 71 if (__dest < __src)
df4879fa2603fb Nicolas Pitre 2011-09-13 @72 return memcpy(__dest, __src, count);
df4879fa2603fb Nicolas Pitre 2011-09-13 73
df4879fa2603fb Nicolas Pitre 2011-09-13 74 while (count--)
df4879fa2603fb Nicolas Pitre 2011-09-13 75 d[count] = s[count];
df4879fa2603fb Nicolas Pitre 2011-09-13 76 return __dest;
df4879fa2603fb Nicolas Pitre 2011-09-13 77 }
df4879fa2603fb Nicolas Pitre 2011-09-13 78
:::::: The code@line 29 was first introduced by commit
:::::: df4879fa2603fbf0804a80f9f146ef9023dd621f ARM: zImage: gather some string functions into string.c
:::::: TO: Nicolas Pitre <nicolas.pitre@linaro.org>
:::::: CC: Nicolas Pitre <nico@fluxnic.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33544 bytes --]
reply other threads:[~2021-06-19 20:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202106200409.iWMjumpZ-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.