From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [norov:bitmap 45/47] lib/bitmap.c:1570:17: error: initializing 'unsigned long *' with an expression of type 'const unsigned long *' discards qualifiers
Date: Fri, 22 Apr 2022 04:25:55 +0800 [thread overview]
Message-ID: <202204220430.uHgyhQL9-lkp@intel.com> (raw)
tree: https://github.com/norov/linux bitmap
head: 29f3046c8c2929f8dbe5e1cb4f25ebdd5366ebe7
commit: f1cbd19c47bf73d532ff30571601c7ede57d5f82 [45/47] lib: add bitmap_{from,to}_arr64
config: mips-allnoconfig (https://download.01.org/0day-ci/archive/20220422/202204220430.uHgyhQL9-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/norov/linux/commit/f1cbd19c47bf73d532ff30571601c7ede57d5f82
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov bitmap
git checkout f1cbd19c47bf73d532ff30571601c7ede57d5f82
# 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=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> lib/bitmap.c:1570:17: error: initializing 'unsigned long *' with an expression of type 'const unsigned long *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
unsigned long *end = bitmap + BITS_TO_LONGS(nbits);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/bitmap.c:1575:22: warning: shift count >= width of type [-Wshift-count-overflow]
*buf |= *bitmap++ << 32;
^ ~~
1 warning and 1 error generated.
vim +1570 lib/bitmap.c
1561
1562 /**
1563 * bitmap_to_arr64 - copy the contents of bitmap to a u64 array of bits
1564 * @buf: array of u64 (in host byte order), the dest bitmap
1565 * @bitmap: array of unsigned longs, the source bitmap
1566 * @nbits: number of bits in @bitmap
1567 */
1568 void bitmap_to_arr64(u64 *buf, const unsigned long *bitmap, unsigned int nbits)
1569 {
> 1570 unsigned long *end = bitmap + BITS_TO_LONGS(nbits);
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-04-21 20:26 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=202204220430.uHgyhQL9-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=yury.norov@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).