linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'kernel test robot' <lkp@intel.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	'Andy Shevchenko' <andriy.shevchenko@linux.intel.com>,
	'Andrew Morton' <akpm@linux-foundation.org>,
	"'Matthew Wilcox (Oracle)'" <willy@infradead.org>,
	'Christoph Hellwig' <hch@infradead.org>,
	"'Jason A. Donenfeld'" <Jason@zx2c4.com>
Cc: "oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
	"Linux Memory Management List" <linux-mm@kvack.org>
Subject: RE: [PATCH next v2 5/5] minmax: Relax check to allow comparison between int and small unsigned constants.
Date: Sun, 30 Jul 2023 16:55:52 +0000	[thread overview]
Message-ID: <9b85dfdbf967418a8be605bd0e6a8c52@AcuMS.aculab.com> (raw)
In-Reply-To: <202307290538.EtRKfGgC-lkp@intel.com>

From: kernel test robot
> Sent: 28 July 2023 22:43
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on akpm-mm/mm-everything]
> [also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
> [cannot apply to next-20230728]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Add-min_unsigned-a-b-and-
> max_unsigned-a-b/20230728-225439
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> patch link:    https://lore.kernel.org/r/b4ce9dad748e489f9314a2dc95615033%40AcuMS.aculab.com
> patch subject: [PATCH next v2 5/5] minmax: Relax check to allow comparison between int and small
> unsigned constants.
> config: alpha-randconfig-r024-20230727 (https://download.01.org/0day-
> ci/archive/20230729/202307290538.EtRKfGgC-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 12.3.0
> reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290538.EtRKfGgC-
> lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202307290538.EtRKfGgC-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/kernel.h:27,
>                     from include/linux/cpumask.h:10,
>                     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 net/ceph/osdmap.c:5:
>    net/ceph/osdmap.c: In function 'osdmap_decode':
> >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra]
>       26 |                 ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))

I have a cunning plan to fix this (and warnings about testing 'unsigned >= 0').
Basically replace the first test with:
	__builtin_choose_expr(is_signed(x), x, 1) >= 0

(Also fixes the build with clang < 16.)

Hopefully that v3 will keep the build robert happy :-)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)



      reply	other threads:[~2023-07-30 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <b4ce9dad748e489f9314a2dc95615033@AcuMS.aculab.com>
2023-07-28 21:43 ` kernel test robot
2023-07-30 16:55   ` David Laight [this message]

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=9b85dfdbf967418a8be605bd0e6a8c52@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willy@infradead.org \
    /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