Re: [ammarfaizi2-block:akpm/mm/mm-unstable 46/244] lib/test_maple_tree.c:453:12: warning: result of comparison of constant 4398046511104 with expression of type 'unsigned long' is always false

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> [221031 19:10]:
> On Sun, 30 Oct 2022 13:04:16 +0800 kernel test robot <lkp@xxxxxxxxx> wrote:
> 
> > tree:   https://github.com/ammarfaizi2/linux-block akpm/mm/mm-unstable
> > head:   eecc1f68b7ae1e677dd01b728e58de61a2f8ae71
> > commit: d9c0ca7c6a02830de65fbc684cf0be7e6510737c [46/244] maple_tree: reorganize testing to restore module testing
> > config: hexagon-allmodconfig
> > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
> > 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/ammarfaizi2/linux-block/commit/d9c0ca7c6a02830de65fbc684cf0be7e6510737c
> >         git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
> >         git fetch --no-tags ammarfaizi2-block akpm/mm/mm-unstable
> >         git checkout d9c0ca7c6a02830de65fbc684cf0be7e6510737c
> >         # 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 lib/
> > 
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > 
> > All warnings (new ones prefixed by >>):
> > 
> > >> lib/test_maple_tree.c:453:12: warning: result of comparison of constant 4398046511104 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
> >                    if ((val == 4398046511104) || (val == ULONG_MAX))
> >                         ~~~ ^  ~~~~~~~~~~~~~
> >    lib/test_maple_tree.c:496:17: warning: result of comparison of constant 4398046511104 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
> >                    else if ((val == 4398046511104) || (val == ULONG_MAX))
> >                              ~~~ ^  ~~~~~~~~~~~~~
> >    lib/test_maple_tree.c:182:19: warning: unused function 'not_empty' [-Wunused-function]
> >    static inline int not_empty(struct maple_node *node)
> 
> Thanks.  A 32-bit build, I assume.

Yes, it seems to be.  I've defined CONFIG_64BIT on compile time of the
userspace code, so it's a pretty easy and ugly ifdef fix.  I just
haven't fully tested it to send out. (module, in-kernel on i386/x86_64
(at minimum) + userspace radix test tree on both)

> 
> Liam, what's with that 4398046511104?  Wouldn't 0x40000000000 be clearer?  

I had the hex and changed it to decimal so I could easily search for it
in a tree dump - it was more unique.  At one point I had it as a comment
next to the hex, which might be a better way to keep it around for
searching if there is ever a bug here again.  I'll include that in the
patch.

Thanks,
Liam




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux