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 0A2FEC00528 for ; Tue, 25 Jul 2023 14:57:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8DCBA6B0071; Tue, 25 Jul 2023 10:57:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 870116B0074; Tue, 25 Jul 2023 10:57:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 705B26B0075; Tue, 25 Jul 2023 10:57:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 584FF6B0071 for ; Tue, 25 Jul 2023 10:57:01 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 14E51C0E2C for ; Tue, 25 Jul 2023 14:57:01 +0000 (UTC) X-FDA: 81050436642.14.CED7FAE Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf21.hostedemail.com (Postfix) with ESMTP id 8E4F01C0020 for ; Tue, 25 Jul 2023 14:56:57 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=lQDFlAKR; spf=pass (imf21.hostedemail.com: domain of lkp@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690297019; 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=QvNv8Slp4wRL8kGDNi4rzXOrOgyJBjT+cQJUYODAWh4=; b=GaFEfKO1ko4Y/EXAJnVcIW9L8UGdmoeFBNRVvZUmj0K+1nqHhsqZatRU52x1YQyKzX/RIO CtWvDUU4GLHCySvFYBWwA9yI53OgQwu/WbMQx6e4CCdnv64pv+ikCfZ41DjP9yUt6wAD1b fOlLTxkVk+Bbx3JEJlTjQaQH1mEm0s0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690297019; a=rsa-sha256; cv=none; b=bZVHa+jEHDGM+p4kxD5MuBLJwGYVeTtaIc9/S1cNhfltMqefElkzS+blLWbjM5ISb5LsO9 iwBQ3YySo4fiKUHgxUf1u8B9oHdgl5al0BeoiV0uwNDJ2p/hk13SrQO7ZfXa8w9Y0Une5r RMKCTVSBsIGQU6Fj/RGv3XVEplLWnok= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=lQDFlAKR; spf=pass (imf21.hostedemail.com: domain of lkp@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690297017; x=1721833017; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=C6+c5ngyQlSR9n2/Vk/Z/wFT30T1Y1p1Gdxk/gwRU3g=; b=lQDFlAKR3T4RQFefTrzDfBKquVbye4CVKVlAKbs454RK+6EDYU8c61Zw TlzawVNtckciFwFV5ZWrWCsPGGf/pGJVmPRBcA8Eb0SkScq4yyQWXrWxp u/R/99hS4tOSWTUwYkTUsiNQAlKYNrjD1cXPZlvI+9GDiFVGnh9NbIyfr 64fK3F0Er5YM1rBqSv6mWXu25DMj74OpVenRSN4uVqc1eiQOrWCfRRsZX ccmWxGrTtzuPhSsIvR5dyiOEslhocmHjQoDCmNnQ9+Y0UNrJEE5H6HSZm 2n4IYpasvKve7CWOUqL2KvKRy5kecFH2jwrIuNJlIf5dbXTCNSPXhua2u A==; X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="367776600" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="367776600" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 07:56:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="1056808598" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="1056808598" Received: from lkp-server02.sh.intel.com (HELO 953e8cd98f7d) ([10.239.97.151]) by fmsmga005.fm.intel.com with ESMTP; 25 Jul 2023 07:56:52 -0700 Received: from kbuild by 953e8cd98f7d with local (Exim 4.96) (envelope-from ) id 1qOJT1-00004l-2C; Tue, 25 Jul 2023 14:56:51 +0000 Date: Tue, 25 Jul 2023 22:56:39 +0800 From: kernel test robot To: David Laight , "linux-kernel@vger.kernel.org" , 'Andy Shevchenko' , 'Andrew Morton' , "Matthew Wilcox (Oracle)" , Christoph Hellwig , "Jason A. Donenfeld" Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [PATCH next 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness. Message-ID: <202307252241.W1SwUDKu-lkp@intel.com> References: <454f967d452548a9acfa7c0a0872507e@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <454f967d452548a9acfa7c0a0872507e@AcuMS.aculab.com> X-Rspamd-Queue-Id: 8E4F01C0020 X-Rspam-User: X-Stat-Signature: fxbzni4quhonda4x8n9tbg7cfjxbtoor X-Rspamd-Server: rspam03 X-HE-Tag: 1690297017-96010 X-HE-Meta: U2FsdGVkX184RbtHuXL9whXNtj4PsAfnJjSn7oMlGTfqr+FESQwFLqGo+AFMd3vcq7o1oEWV0pBHqK+2MwBK6x6rPSKHBJJzu7u/othKeMYhtNfGNUOQKyvspduJmr4dR2oXnohfioRsUZNDRTaBNtKjYK+tGdHbvMOaIPRB3Y+TFEc1M4rQYElFpaaQ3so+jk+ojZMBKwro+ia39fMnoajyhiNjeMLLvt2NyexumUrgiQbP6/ecMQgPOyl2CTZiV9YxfmDWyw5KPiCqqRej4tTqz6s8B+JvB8+SlXbLvNhTQG1gE/xy+c/QCWnOj3BtpHKQdKZBg6BHJTxcFg2/VA9/hYjL0/xZMsGo/5Y22aEyIFCwZXCdEBuSlHh1WmUhs9oWXiXoBS0EA9MZ1gVflYzaHw0vHWp2PrvboribT/CRvbL5iXMjbYmE8yIgQKFuxac+r6qCgb86RMA9ZmTJbN+R1uFaWVkLjfJ8yc1aPqW2ZW+apc2UgLtWQ/bYyiT243klRXkpuVEcrJYx86COvqnghvJFKdzdbn7XRnEpIUm6H+ir9ZrI1rcVVuhHOIF/yDr6mWgSsIx5zgxFJDHDjaIlVIGvBhvWK+24irJaiAQ9n3iyiw/HOLZnfbWTXn/vBrnO8498pl7AqgWL0k8Ntyf03ifh+FT5Oftrpw/XnPY4tjM4a03Cs+KE9RKWu5T0Qkm10Q3akrybdkImKi4ad8+kVSkYhh+Uyfm72MEXWXo3PYASVSi8eYe79UO8ARIQfAWwrqJKzC6XvaZj6pXD70PCW0Ubp5QxAKN5FVjmvTJCeIZhPCQcj9pqzyOQYYcrxsPT/0RN/HOpVqlFcfiaVDNFdIzzKvrnN7RtgMuodXBWBM1vT/jH5KTWVU+Oz3hQhufHpGNisW4t14c9oY/2dqdq9ncnaSEHCkR1omEYS9ImSBDmh+8szJW+hw+g3QbbPxHqOQaJ3Auq9HPCKhc V9CTYL/5 m7VIGKKdgmlBjaDW36UC1bOKJUTlJE7qOYK9GLJm6czkXN3ktPvs+J/bNI783m1VR8s2zM5RPU2K0MUQFUe9DM1OmTZKab/3Gi65bi5gSuc1SAFXpHlEa56GK8YE87Rj5yc9cZ9O/6O31LFmqJXV4X/Ik/Evb7csM8p3aFA7UrxTEVB6Cc2A17o5hjon4W4Iq9+NhRW+adu0xI6DImOzQKCORmy88vFJ+PuN5QxzZO3F2HD3IJx3Cl3DucNdLk3unNwM5IMuxU2mvN3G5KnDe+uS2KAnKgoTlq+c3bLKCNJP83wcP5G5e5rNERS9OBASaGComFRBsDiW8O7mbOvGunhauAaZwuYSU2w9RAxAAdIMfqxbplr3hi9NVlC5qgcyJ3GVqWsz1rZ178Bx9+9u5dbrIxJlO3jcOCljJ7/gwxTVECrDh57lW/PZpAxsctpx+n76JAhJWelq4Bfzo7LRzsybILg== 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: Hi David, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on linus/master v6.5-rc3 next-20230725] [cannot apply to next-20230725 hch-configfs/for-next] [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/20230725-180332 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/454f967d452548a9acfa7c0a0872507e%40AcuMS.aculab.com patch subject: [PATCH next 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness. config: um-allyesconfig (https://download.01.org/0day-ci/archive/20230725/202307252241.W1SwUDKu-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce: (https://download.01.org/0day-ci/archive/20230725/202307252241.W1SwUDKu-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/202307252241.W1SwUDKu-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from init/calibrate.c:8: >> include/linux/jiffies.h:427:28: error: implicit declaration of function 'static_assert' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return jiffies_to_clock_t(max(0L, delta)); ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' #define max(x, y) __careful_cmp(max, x, y) ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' static_assert(__types_ok(x, y), \ ^ In file included from init/calibrate.c:8: include/linux/jiffies.h:432:26: error: implicit declaration of function 'static_assert' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return jiffies_to_msecs(max(0L, delta)); ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' #define max(x, y) __careful_cmp(max, x, y) ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' static_assert(__types_ok(x, y), \ ^ 2 errors generated. -- In file included from kernel/workqueue.c:39: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from kernel/workqueue.c:39: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from kernel/workqueue.c:39: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> kernel/workqueue.c:4579:9: error: static_assert expression is not an integral constant expression return clamp_val(max_active, 1, lim); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:171:32: note: expanded from macro 'clamp_val' #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:158:36: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) __careful_clamp((type)(val), (type)(lo), (type)(hi)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ 12 warnings and 1 error generated. -- In file included from mm/mm_init.c:17: In file included from include/linux/memblock.h:13: In file included from arch/um/include/asm/dma.h:5: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from mm/mm_init.c:17: In file included from include/linux/memblock.h:13: In file included from arch/um/include/asm/dma.h:5: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from mm/mm_init.c:17: In file included from include/linux/memblock.h:13: In file included from arch/um/include/asm/dma.h:5: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> mm/mm_init.c:908:14: error: static_assert expression is not an integral constant expression start_pfn = clamp(start_pfn, zone_start_pfn, zone_end_pfn); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:123:28: note: expanded from macro 'clamp' #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ mm/mm_init.c:909:12: error: static_assert expression is not an integral constant expression end_pfn = clamp(end_pfn, zone_start_pfn, zone_end_pfn); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:123:28: note: expanded from macro 'clamp' #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ mm/mm_init.c:1145:15: error: static_assert expression is not an integral constant expression start_pfn = clamp(start_pfn, range_start_pfn, range_end_pfn); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:123:28: note: expanded from macro 'clamp' #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ mm/mm_init.c:1146:13: error: static_assert expression is not an integral constant expression end_pfn = clamp(end_pfn, range_start_pfn, range_end_pfn); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:123:28: note: expanded from macro 'clamp' #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ mm/mm_init.c:1189:16: error: static_assert expression is not an integral constant expression start_pfn = clamp(memblock_region_memory_base_pfn(r), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:123:28: note: expanded from macro 'clamp' #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ mm/mm_init.c:1191:14: error: static_assert expression is not an integral constant expression end_pfn = clamp(memblock_region_memory_end_pfn(r), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:123:28: note: expanded from macro 'clamp' #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ -- In file included from mm/page_alloc.c:20: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from mm/page_alloc.c:20: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from mm/page_alloc.c:20: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> mm/page_alloc.c:2415:10: error: static_assert expression is not an integral constant expression batch = clamp(batch, min_nr_free, max_nr_free); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:123:28: note: expanded from macro 'clamp' #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:54:3: note: expanded from macro '__careful_clamp' __clamp_once(val, lo, hi, __UNIQUE_ID(__val), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:17: note: expanded from macro '__clamp_once' static_assert(!__is_constexpr((lo) > (hi)) || (lo) <= (hi), \ ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:77:50: note: expanded from macro 'static_assert' #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: expanded from macro '__static_assert' #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) ^~~~ 12 warnings and 1 error generated. .. vim +/static_assert +427 include/linux/jiffies.h ae60d6a0e3a919 Nicholas Mc Guire 2015-05-28 420 9ca308506062fc Baolin Wang 2015-07-29 421 extern unsigned long timespec64_to_jiffies(const struct timespec64 *value); 9ca308506062fc Baolin Wang 2015-07-29 422 extern void jiffies_to_timespec64(const unsigned long jiffies, 9ca308506062fc Baolin Wang 2015-07-29 423 struct timespec64 *value); cbbc719fccdb8c hank 2011-09-20 424 extern clock_t jiffies_to_clock_t(unsigned long x); a399a8053164ec Eric Dumazet 2012-08-08 425 static inline clock_t jiffies_delta_to_clock_t(long delta) a399a8053164ec Eric Dumazet 2012-08-08 426 { a399a8053164ec Eric Dumazet 2012-08-08 @427 return jiffies_to_clock_t(max(0L, delta)); a399a8053164ec Eric Dumazet 2012-08-08 428 } a399a8053164ec Eric Dumazet 2012-08-08 429 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki