From: kernel test robot <lkp@intel.com>
To: Yu-Jen Chang <arthurchang09@gmail.com>,
andy@kernel.org, akinobu.mita@gmail.com
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
jserv@ccns.ncku.edu.tw, linux-kernel@vger.kernel.org,
Yu-Jen Chang <arthurchang09@gmail.com>
Subject: Re: [PATCH 2/2] lib/string.c: Optimize memchr()
Date: Mon, 11 Jul 2022 00:58:31 +0800 [thread overview]
Message-ID: <202207110028.KNZ3Yupd-lkp@intel.com> (raw)
In-Reply-To: <20220710142822.52539-3-arthurchang09@gmail.com>
Hi Yu-Jen,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.19-rc5 next-20220708]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yu-Jen-Chang/Optimize-memchr/20220710-223118
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b1c428b6c3684ee8ddf4137d68b3e8d51d2a700f
config: hexagon-randconfig-r041-20220710 (https://download.01.org/0day-ci/archive/20220711/202207110028.KNZ3Yupd-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6ce63e267aab79ca87bf63453d34dd3909ab978d)
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
# https://github.com/intel-lab-lkp/linux/commit/307ee542c2bd8378b2225910f3f9b982df7a7669
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yu-Jen-Chang/Optimize-memchr/20220710-223118
git checkout 307ee542c2bd8378b2225910f3f9b982df7a7669
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> lib/string.c:902:7: error: conflicting types for 'memchr'
void *memchr(const void *p, int c, unsigned long length)
^
include/linux/string.h:162:15: note: previous declaration is here
extern void * memchr(const void *,int,__kernel_size_t);
^
1 error generated.
vim +/memchr +902 lib/string.c
891
892 #ifndef __HAVE_ARCH_MEMCHR
893 /**
894 * memchr - Find a character in an area of memory.
895 * @p: The memory area
896 * @c: The byte to search for
897 * @length: The size of the area.
898 *
899 * returns the address of the first occurrence of @c, or %NULL
900 * if @c is not found
901 */
> 902 void *memchr(const void *p, int c, unsigned long length)
903 {
904 u64 mask, val;
905 const void *end = p + length;
906
907 c &= 0xff;
908 if (p <= end - 8) {
909 mask = c;
910 MEMCHR_MASK_GEN(mask);
911
912 for (; p <= end - 8; p += 8) {
913 val = *(u64 *)p ^ mask;
914 if ((val + 0xfefefefefefefeffu) &
915 (~val & 0x8080808080808080u))
916 break;
917 }
918 }
919
920 for (; p < end; p++)
921 if (*(unsigned char *)p == c)
922 return (void *)p;
923
924 return NULL;
925 }
926 EXPORT_SYMBOL(memchr);
927 #endif
928
--
0-DAY CI Kernel Test Service
https://01.org/lkp
parent reply other threads:[~2022-07-10 16:59 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20220710142822.52539-3-arthurchang09@gmail.com>]
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=202207110028.KNZ3Yupd-lkp@intel.com \
--to=lkp@intel.com \
--cc=akinobu.mita@gmail.com \
--cc=andy@kernel.org \
--cc=arthurchang09@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox