All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Laight <David.Laight@aculab.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	'Linus Torvalds' <torvalds@linuxfoundation.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"'Matthew Wilcox (Oracle)'" <willy@infradead.org>,
	'Christoph Hellwig' <hch@infradead.org>,
	'Andrew Morton' <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	'Andy Shevchenko' <andriy.shevchenko@linux.intel.com>,
	'Dan Carpenter' <dan.carpenter@linaro.org>,
	'Arnd Bergmann' <arnd@kernel.org>,
	"'Jason@zx2c4.com'" <Jason@zx2c4.com>,
	"'pedro.falcato@gmail.com'" <pedro.falcato@gmail.com>,
	'Mateusz Guzik' <mjguzik@gmail.com>
Subject: Re: [PATCH 4/7] minmax: Simplify signedness check
Date: Thu, 25 Jul 2024 21:24:09 +0800	[thread overview]
Message-ID: <202407252100.fDFchC5O-lkp@intel.com> (raw)
In-Reply-To: <03601661326c4efba4e618ead15fa0e2@AcuMS.aculab.com>

Hi David,

kernel test robot noticed the following build errors:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v6.10 next-20240725]
[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-Put-all-the-clamp-definitions-together/20240724-224832
base:   linux/master
patch link:    https://lore.kernel.org/r/03601661326c4efba4e618ead15fa0e2%40AcuMS.aculab.com
patch subject: [PATCH 4/7] minmax: Simplify signedness check
config: mips-loongson1b_defconfig (https://download.01.org/0day-ci/archive/20240725/202407252100.fDFchC5O-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240725/202407252100.fDFchC5O-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/202407252100.fDFchC5O-lkp@intel.com/

All errors (new ones prefixed by >>):

>> crypto/skcipher.c:83:9: error: static assertion expression is not an integral constant expression
           return max(start, end_page);
                  ^~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:70:19: note: expanded from macro 'max'
   #define max(x, y)       __careful_cmp(max, x, y)
                           ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:56:3: note: expanded from macro '__careful_cmp'
                   __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:49:17: note: expanded from macro '__cmp_once'
           _Static_assert(__types_ok(x, y),                        \
                          ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:38:2: note: expanded from macro '__types_ok'
           ((__is_ok_signed(x) && __is_ok_signed(y)) ||    \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   crypto/skcipher.c:83:9: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
   include/linux/minmax.h:70:19: note: expanded from macro 'max'
   #define max(x, y)       __careful_cmp(max, x, y)
                           ^
   include/linux/minmax.h:56:3: note: expanded from macro '__careful_cmp'
                   __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
                   ^
   include/linux/minmax.h:49:17: note: expanded from macro '__cmp_once'
           _Static_assert(__types_ok(x, y),                        \
                          ^
   include/linux/minmax.h:38:4: note: expanded from macro '__types_ok'
           ((__is_ok_signed(x) && __is_ok_signed(y)) ||    \
             ^
   include/linux/minmax.h:34:27: note: expanded from macro '__is_ok_signed'
   #define __is_ok_signed(x) is_signed_type(typeof((x) + 0))
                             ^
   include/linux/compiler.h:273:32: note: expanded from macro 'is_signed_type'
   #define is_signed_type(type) (((type)(-1)) < (__force type)1)
                                  ^
   1 error generated.
--
>> lib/lzo/lzo1x_compress.c:53:33: error: static assertion expression is not an integral constant expression
                           const unsigned char *limit = min(ip_end, ip + MAX_ZERO_RUN_LENGTH + 1);
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:63:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(min, x, y)
                           ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:56:3: note: expanded from macro '__careful_cmp'
                   __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:49:17: note: expanded from macro '__cmp_once'
           _Static_assert(__types_ok(x, y),                        \
                          ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:38:2: note: expanded from macro '__types_ok'
           ((__is_ok_signed(x) && __is_ok_signed(y)) ||    \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/lzo/lzo1x_compress.c:53:33: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
   include/linux/minmax.h:63:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(min, x, y)
                           ^
   include/linux/minmax.h:56:3: note: expanded from macro '__careful_cmp'
                   __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
                   ^
   include/linux/minmax.h:49:17: note: expanded from macro '__cmp_once'
           _Static_assert(__types_ok(x, y),                        \
                          ^
   include/linux/minmax.h:38:4: note: expanded from macro '__types_ok'
           ((__is_ok_signed(x) && __is_ok_signed(y)) ||    \
             ^
   include/linux/minmax.h:34:27: note: expanded from macro '__is_ok_signed'
   #define __is_ok_signed(x) is_signed_type(typeof((x) + 0))
                             ^
   include/linux/compiler.h:273:32: note: expanded from macro 'is_signed_type'
   #define is_signed_type(type) (((type)(-1)) < (__force type)1)
                                  ^
   1 error generated.


vim +83 crypto/skcipher.c

b286d8b1a690667 Herbert Xu 2016-11-22  75  
b286d8b1a690667 Herbert Xu 2016-11-22  76  /* Get a spot of the specified length that does not straddle a page.
b286d8b1a690667 Herbert Xu 2016-11-22  77   * The caller needs to ensure that there is enough space for this operation.
b286d8b1a690667 Herbert Xu 2016-11-22  78   */
b286d8b1a690667 Herbert Xu 2016-11-22  79  static inline u8 *skcipher_get_spot(u8 *start, unsigned int len)
b286d8b1a690667 Herbert Xu 2016-11-22  80  {
b286d8b1a690667 Herbert Xu 2016-11-22  81  	u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
b286d8b1a690667 Herbert Xu 2016-11-22  82  
b286d8b1a690667 Herbert Xu 2016-11-22 @83  	return max(start, end_page);
b286d8b1a690667 Herbert Xu 2016-11-22  84  }
b286d8b1a690667 Herbert Xu 2016-11-22  85  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-07-25 13:25 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 14:26 [PATCH 0/7] minmax: reduce compilation time David Laight
2024-07-24 14:28 ` [PATCH 1/7] minmax: Put all the clamp() definitions together David Laight
2024-07-24 14:29 ` [PATCH 2/7] minmax: Use _Static_assert() instead of static_assert() David Laight
2024-07-24 14:29 ` [PATCH 3/7] compiler.h: Add __if_constexpr(expr, if_const, if_not_const) David Laight
2024-07-24 17:32   ` Arnd Bergmann
2024-07-25  9:12     ` David Laight
2024-07-24 19:48   ` Linus Torvalds
2024-07-25  8:45     ` David Laight
2024-07-24 14:30 ` [PATCH 4/7] minmax: Simplify signedness check David Laight
2024-07-24 16:48   ` Arnd Bergmann
2024-07-24 20:02     ` Linus Torvalds
2024-07-25  9:00       ` David Laight
2024-07-25 17:02         ` Linus Torvalds
2024-07-26  9:43           ` Lorenzo Stoakes
2024-07-26 12:57             ` David Laight
2024-07-26 13:27               ` Lorenzo Stoakes
2024-07-25 13:24   ` kernel test robot [this message]
2024-07-25 16:39     ` David Laight
2024-07-24 14:31 ` [PATCH 5/7] minmax: Factor out the zero-extension logic from umin/umax David Laight
2024-07-24 14:32 ` [PATCH 6/7] minmax: Optimise _Static_assert() check in clamp() David Laight
2024-07-24 14:33 ` [PATCH 7/7] minmax: minmax: Add __types_ok3() and optimise defines with 3 arguments David Laight
2024-07-24 17:03   ` Arnd Bergmann
2024-07-25  9:07     ` David Laight
2024-07-24 19:34 ` [PATCH 0/7] minmax: reduce compilation time Lorenzo Stoakes
2024-07-24 19:52   ` Linus Torvalds
2024-07-26 18:12     ` Lorenzo Stoakes
2024-07-26 18:24       ` Linus Torvalds
2024-07-26 18:56         ` Lorenzo Stoakes
2024-07-26 19:21           ` Lorenzo Stoakes
2024-07-26 21:36             ` Linus Torvalds
2024-07-26 21:46               ` Jens Axboe
2024-07-26 22:48               ` Linus Torvalds
2024-07-27 15:30                 ` Jens Axboe
2024-07-27 15:38                   ` Jens Axboe
2024-07-27 16:31                     ` Lorenzo Stoakes
2024-07-27 16:36                       ` Jens Axboe
2024-07-27 16:41                         ` Lorenzo Stoakes
2024-07-27 16:52                           ` Jens Axboe
2024-07-27 16:56                             ` Lorenzo Stoakes
2024-07-28 11:32                       ` David Laight
2024-07-27  4:13               ` Linus Torvalds
2024-07-27  4:14                 ` Linus Torvalds
2024-07-27  8:08                 ` David Laight
2024-07-27 18:58                   ` Lorenzo Stoakes
2024-07-27 19:21                     ` Linus Torvalds
2024-07-28 11:17                     ` David Laight
2024-07-28 13:07                       ` Lorenzo Stoakes
2024-07-27 17:33                 ` Matthew Wilcox
2024-07-27 18:16                   ` Linus Torvalds
2024-07-27  8:07             ` Lorenzo Stoakes
2024-07-27 16:26               ` Linus Torvalds
2024-07-27 18:44                 ` Lorenzo Stoakes
2024-07-30  4:10                 ` Linus Torvalds
2024-07-30 10:36                   ` Arnd Bergmann
2024-07-28 17:57           ` Geert Uytterhoeven
2024-07-28 18:43             ` Lorenzo Stoakes
2024-07-26 21:32         ` David Laight
2024-07-26 21:38           ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2024-07-25 19:28 [PATCH 4/7] minmax: Simplify signedness check kernel test robot
2024-07-25 20:02 kernel test robot

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=202407252100.fDFchC5O-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=David.Laight@aculab.com \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=mjguzik@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pedro.falcato@gmail.com \
    --cc=torvalds@linuxfoundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.