public inbox for [email protected]
 help / color / mirror / Atom feed
From: Liam Howlett <[email protected]>
To: Andrew Morton <[email protected]>
Cc: kernel test robot <[email protected]>,
	"[email protected]" <[email protected]>,
	"[email protected]" <[email protected]>,
	Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>,
	Linux Memory Management List <[email protected]>
Subject: 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: Tue, 1 Nov 2022 17:24:32 +0000	[thread overview]
Message-ID: <20221101170854.43lt42yokl34vemc@revolver> (raw)
In-Reply-To: <[email protected]>

* Andrew Morton <[email protected]> [221031 19:10]:
> On Sun, 30 Oct 2022 13:04:16 +0800 kernel test robot <[email protected]> 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 <[email protected]>
> > 
> > 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

  reply	other threads:[~2022-11-01 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30  5:04 [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 kernel test robot
2022-10-31 23:10 ` Andrew Morton
2022-11-01 17:24   ` Liam Howlett [this message]
2022-11-02  0:12     ` Hugh Dickins
2022-11-04 18:57       ` Liam Howlett

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=20221101170854.43lt42yokl34vemc@revolver \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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