From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EB91C54E41 for ; Tue, 27 Feb 2024 01:35:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 911AA4401D6; Mon, 26 Feb 2024 20:35:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C1A244017F; Mon, 26 Feb 2024 20:35:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7621A4401D6; Mon, 26 Feb 2024 20:35:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 6615544017F for ; Mon, 26 Feb 2024 20:35:11 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 35B461C0B42 for ; Tue, 27 Feb 2024 01:35:11 +0000 (UTC) X-FDA: 81835865622.27.AAB2F4D Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by imf11.hostedemail.com (Postfix) with ESMTP id E89FD40009 for ; Tue, 27 Feb 2024 01:35:07 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=EIdJrt2S; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf11.hostedemail.com: domain of lkp@intel.com designates 198.175.65.12 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708997708; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=l4LrJRdHp340AOJK9SoiyHzRsPoN7yM+/oO4eT8LMCs=; b=EW3DzX8CEVSZ4Y0YtpMkd/bB4JoByx+/e45gCd8jx6l9Y8MHgXJQ26rNbfGbq5mq0p+wDd vEioUqli/WKZzdIliVkC8eS40GCbK0zO5utef5V3ebT7tYQUDeX5cT0ky2MelB2NfsepL8 5Up4/nBOVod0DS7QINcbfIFo6namzMs= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=EIdJrt2S; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf11.hostedemail.com: domain of lkp@intel.com designates 198.175.65.12 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708997708; a=rsa-sha256; cv=none; b=opaBqbcLL0M2LbYwnfaf9caIBdDyybyJVj/FQih2/XyxYsdC62MWa246sgKzQcJksS1p+c UJU45p/9juX+jgfYtQSOJ/6Cnya116nL1JQt+Gtcm4GkgqDk03NlXzV2DUvlv/52sSnR7O ZTjD9xN8TsJIZrSuOmV/b9V9PQ6eKso= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708997708; x=1740533708; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=I4qbGa1x1CoD5kBOxiBqkFTCRyoMQhZk9v2T6sCcWaQ=; b=EIdJrt2SFctd8f6JU0tYY8NaeZT6YaxZv3uiN0t/1MwlRQYXVWIsGi55 h+VbPwvwWdNIk9kzkhFSkAp1x4xZBlpAUKIuVO55agnNW542EVZsC1Gaz LogpP4vE+7PmgxiABd3fhYaewqVGEVUEpZNWEbv07uwbus2Ibm0kk04R2 hAtkqEVfccssrZeFth7uh4xFqWVRwb0CUu2fCh0bU9xuGv6Wnt59InNx3 nQKwvSiLZvMAYoe/bPJsFthzaZVonckwFEbVfINGJY3c2PZm0q7BR3ujl kNHYT/MB/0ByUTFCBT4oJVCjyN9nREFvknc0rm4pu7dDXxm73kNkIJVhN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="14757285" X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="14757285" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 17:35:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="7406508" Received: from lkp-server02.sh.intel.com (HELO 3c78fa4d504c) ([10.239.97.151]) by orviesa008.jf.intel.com with ESMTP; 26 Feb 2024 17:35:02 -0800 Received: from kbuild by 3c78fa4d504c with local (Exim 4.96) (envelope-from ) id 1remN1-000Apj-0j; Tue, 27 Feb 2024 01:34:59 +0000 Date: Tue, 27 Feb 2024 09:34:25 +0800 From: kernel test robot To: David Laight , "'linux-kernel@vger.kernel.org'" , 'Linus Torvalds' , 'Netdev' , "'dri-devel@lists.freedesktop.org'" Cc: oe-kbuild-all@lists.linux.dev, 'Jens Axboe' , "'Matthew Wilcox (Oracle)'" , 'Christoph Hellwig' , "'linux-btrfs@vger.kernel.org'" , 'Andrew Morton' , Linux Memory Management List , 'Andy Shevchenko' , "'David S . Miller'" , 'Dan Carpenter' , 'Jani Nikula' Subject: Re: [PATCH next v2 03/11] minmax: Simplify signedness check Message-ID: <202402270937.9kmO5PFt-lkp@intel.com> References: <8657dd5c2264456f8a005520a3b90e2b@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8657dd5c2264456f8a005520a3b90e2b@AcuMS.aculab.com> X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: E89FD40009 X-Stat-Signature: 9tx99z9h7hf6dwro75tj9ocpqduqj36e X-HE-Tag: 1708997707-654138 X-HE-Meta: U2FsdGVkX1/h3IaFw4/0nl6dMuiOyUomM+2hve84qjqZxtpL3wClde1ClEUNmF604qAFBwLFLaMeDl/jvszAqxV7+GTUSpEmKIAx1tKPaQ0gdPZG75c6pouzFV50n4FDVktTJhGDZ5BczgIlU0kPSnluwF0m3/E8b/7iQfI32exf/mUjpA1zGeOoMoQXUnQfFgzpiaP+9gDHS6ULsNUlKk9nxVJVKgG8REz8AehXX9SqajwiQIsv0RrxIrNtG8WwVcsIaSE2UOccxpUFM4MnNwZ9+Kp+aHnHs4np19LyONVwZADdvy3uXjFYoyFLV3eeghpLzDSXx452kipnhSWRHDADZs1XMGEYc7sgF7bs+gEFHS1ZumY8n6ZPHDzoKLaty4oJyNGDdtBT2OP3tVMkJZf8Ou4Y23LLOgk+0WeIncT9aCAr3EtcLK9KUZadPZMXnhCDIpqRKF+UP22FSoE66DP2LiK9CCfRFqzJ+vrer9kJmqWIIxpwZW1ZHWzP4M6FvADifxPu0Tvxo3K2+5ZnQpAAgBu2R6Nh9cZ5E/HC5ZRdfQ4Ebz+B8iiVGg5HX5Dk5B8718quM/qYTI1c++AEKkar5fEE31XUXr7whAcnWhANdb5TccC3Z/mOMgwNTchpKH7Xd/qLeUmyGuqiovMFsPai0IlD8rntKFn5fOsuMaA3B9JiuUi4gyOwSYN2lvrznGTGbcdbXFTXkz4AdmdgDAhXG+QE0TRKI+uKsrrNqDNfDdS38NWBIrXVZfhei6/NymR4vounJsFykaXA+45jVygBkHABQcwRBNGui5LUtQbR0QsQZAPLLRPIjOT7VMYjfVih0JyVGvlhR9eUkJecDw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi David, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on linux/master mkl-can-next/testing kdave/for-next akpm-mm/mm-nonmm-unstable axboe-block/for-next linus/master v6.8-rc6 next-20240226] [cannot apply to next-20240223 dtor-input/next dtor-input/for-linus horms-ipvs/master] [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/20240226-005902 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/8657dd5c2264456f8a005520a3b90e2b%40AcuMS.aculab.com patch subject: [PATCH next v2 03/11] minmax: Simplify signedness check config: alpha-defconfig (https://download.01.org/0day-ci/archive/20240227/202402270937.9kmO5PFt-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240227/202402270937.9kmO5PFt-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202402270937.9kmO5PFt-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:28, from include/linux/cpumask.h:10, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/spinlock.h:63, from include/linux/swait.h:7, from include/linux/completion.h:12, from include/linux/crypto.h:15, from include/crypto/aead.h:13, from include/crypto/internal/aead.h:11, from crypto/skcipher.c:12: crypto/skcipher.c: In function 'skcipher_get_spot': >> include/linux/minmax.h:31:70: warning: ordered comparison of pointer with integer zero [-Wextra] 31 | (is_unsigned_type(typeof(x)) || (__is_constexpr(x) ? (x) + 0 >= 0 : 0)) | ^~ include/linux/minmax.h:39:11: note: in expansion of macro '__is_ok_unsigned' 39 | (__is_ok_unsigned(x) && __is_ok_unsigned(y))) | ^~~~~~~~~~~~~~~~ include/linux/minmax.h:49:24: note: in expansion of macro '__types_ok' 49 | _Static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:56:17: note: in expansion of macro '__cmp_once' 56 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:70:25: note: in expansion of macro '__careful_cmp' 70 | #define max(x, y) __careful_cmp(max, x, y) | ^~~~~~~~~~~~~ crypto/skcipher.c:83:16: note: in expansion of macro 'max' 83 | return max(start, end_page); | ^~~ >> include/linux/minmax.h:31:70: warning: ordered comparison of pointer with integer zero [-Wextra] 31 | (is_unsigned_type(typeof(x)) || (__is_constexpr(x) ? (x) + 0 >= 0 : 0)) | ^~ include/linux/minmax.h:39:34: note: in expansion of macro '__is_ok_unsigned' 39 | (__is_ok_unsigned(x) && __is_ok_unsigned(y))) | ^~~~~~~~~~~~~~~~ include/linux/minmax.h:49:24: note: in expansion of macro '__types_ok' 49 | _Static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:56:17: note: in expansion of macro '__cmp_once' 56 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:70:25: note: in expansion of macro '__careful_cmp' 70 | #define max(x, y) __careful_cmp(max, x, y) | ^~~~~~~~~~~~~ crypto/skcipher.c:83:16: note: in expansion of macro 'max' 83 | return max(start, end_page); | ^~~ vim +31 include/linux/minmax.h 9 10 /* 11 * min()/max()/clamp() macros must accomplish several things: 12 * 13 * - Avoid multiple evaluations of the arguments (so side-effects like 14 * "x++" happen only once) when non-constant. 15 * - Retain result as a constant expressions when called with only 16 * constant expressions (to avoid tripping VLA warnings in stack 17 * allocation usage). 18 * - Perform signed v unsigned type-checking (to generate compile 19 * errors instead of nasty runtime surprises). 20 * - Unsigned char/short are always promoted to signed int and can be 21 * compared against signed or unsigned arguments. 22 * - Unsigned arguments can be compared against non-negative signed constants. 23 * - Comparison of a signed argument against an unsigned constant fails 24 * even if the constant is below __INT_MAX__ and could be cast to int. 25 */ 26 #define __typecheck(x, y) \ 27 (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) 28 29 /* Allow unsigned compares against non-negative signed constants. */ 30 #define __is_ok_unsigned(x) \ > 31 (is_unsigned_type(typeof(x)) || (__is_constexpr(x) ? (x) + 0 >= 0 : 0)) 32 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki