Re: [PATCH 2/2] lib: add test for bitmap_parselist()

From: Yury Norov
Date: Wed Aug 09 2017 - 18:52:55 EST


On Wed, Aug 09, 2017 at 01:33:09PM -0700, Andrew Morton wrote:
> On Wed, 9 Aug 2017 11:28:56 +0800 kbuild test robot <lkp@xxxxxxxxx> wrote:
>
> > [auto build test WARNING on linus/master]
> > [also build test WARNING on v4.13-rc4 next-20170808]
> > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> >
> > url: https://github.com/0day-ci/linux/commits/Yury-Norov/lib-make-bitmap_parselist-thread-safe-and-much-faster/20170809-105307
> > config: i386-randconfig-x000-201732 (attached as .config)
> > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> > reproduce:
> > # save the attached .config to linux build tree
> > make ARCH=i386
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> lib/test_bitmap.c:180:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> > 0xfffffffe, 0x3333333311111111, 0xffffffff77777777};
> > ^~~~~~~~~~~~~~~~~~

Ahh... I didn't take 32-bit arches into account...

> I assume that a simple convertion to unsigned long long will fix that,
> but I'll await Yuri's input (and testing).

The conversion to unsigned long long will work only for little endian
32-bit arches. We trapped into it once:
https://patchwork.kernel.org/patch/9260919+/

It should be the compile-time analogue of bitmap_from_u64()

The patch is attached and seems working to me. But I need some time
for testing...

Yury