From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [norov:bitmap 45/47] include/linux/bitmap.h:305:25: error: cast to pointer from integer of different size
Date: Mon, 18 Apr 2022 17:01:43 +0800 [thread overview]
Message-ID: <202204181659.gwd7pDJ8-lkp@intel.com> (raw)
tree: https://github.com/norov/linux bitmap
head: 45a9e3feb171ccf077979b7ff6a0c6a732cfc17b
commit: 1a21df17d726b4f3c19a148e10d09ec632603f1c [45/47] lib: add bitmap_{from,to}_arr64
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20220418/202204181659.gwd7pDJ8-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.0
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/norov/linux/commit/1a21df17d726b4f3c19a148e10d09ec632603f1c
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov bitmap
git checkout 1a21df17d726b4f3c19a148e10d09ec632603f1c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash lib/
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 >>):
In file included from include/linux/cpumask.h:12,
from include/linux/mm_types_task.h:14,
from include/linux/mm_types.h:5,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from lib/test_bitops.c:9:
include/linux/bitmap.h: In function 'bitmap_from_u64':
>> include/linux/bitmap.h:305:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
305 | (const unsigned long *) (buf), (nbits))
| ^
include/linux/bitmap.h:615:16: note: in expansion of macro 'bitmap_from_arr64'
615 | return bitmap_from_arr64(dst, mask, 64);
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +305 include/linux/bitmap.h
292
293 /*
294 * On 64-bit systems bitmaps are represented as u64 arrays internally. On LE32
295 * machines the order of hi and lo parts of nubmers match the bitmap structure.
296 * In both cases conversion is not needed when copying data from/to arrays of
297 * u64.
298 */
299 #if (BITS_PER_LONG == 32) && defined (__BIG_ENDIAN)
300 void bitmap_from_arr64(unsigned long *bitmap, const u64 *buf, unsigned int nbits);
301 void bitmap_to_arr64(u64 *buf, const unsigned long *bitmap, unsigned int nbits);
302 #else
303 #define bitmap_from_arr64(bitmap, buf, nbits) \
304 bitmap_copy_clear_tail((unsigned long *) (bitmap), \
> 305 (const unsigned long *) (buf), (nbits))
306 #define bitmap_to_arr64(buf, bitmap, nbits) \
307 bitmap_copy_clear_tail((unsigned long *) (buf), \
308 (const unsigned long *) (bitmap), (nbits))
309 #endif
310
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-04-18 9:02 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=202204181659.gwd7pDJ8-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®