Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4578478rwo; Tue, 25 Jul 2023 08:04:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEuzWooEGdwxYTTMxcc44qmBZC3twNICKUMoPlC5NJkQgXBY8+LS9ueeUC923USo4BnBDux X-Received: by 2002:a17:90a:db50:b0:268:2543:723 with SMTP id u16-20020a17090adb5000b0026825430723mr3420166pjx.5.1690297468274; Tue, 25 Jul 2023 08:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690297468; cv=none; d=google.com; s=arc-20160816; b=RtqV3mW9h94Uil5IHBc7TJixtC9D6Cv+Ljg0sRP3lfBVn78svu/EZF8vImOFQ/trZh yKZf8oW4q9LDd/KoJqSC7B9X1CHdjBXUi+pw7DHFxDftXAiIGzKRk9BqM7gG2oHoOWsU CdkxR8z8TunlbxtzwHXjEPA/ZlsTTd0PDItSCtCDpim7SXKzbMgMX44N8Qy0YXEpGg/u smdfxAfTq2M4i/VKg35QzjguY1F1XtRrd/jtQAU+pr8PakniE05I4d6zeuvJBUGXZyiK Fc6sTRV2zZTTFvuTM1cZo9pnQgQ+HJgaUpiCcuhW0ZpHDxJU58vX4s4xZ0n0YIIQMp7n 43wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QvNv8Slp4wRL8kGDNi4rzXOrOgyJBjT+cQJUYODAWh4=; fh=arjO7/fN2vw/xHJSfapMrRVtxLvFaJ7dCWqtxK+pY+Y=; b=MFxWav9sFZnXMw4WSA1JrDzB+RlC88c3yuRtc0eWY1dA5t70GCuFWUWoS+iJOtSaCq 60NlRu8DgxV8N0TxfNIe1BxhLJRKrN0cN8ltPoz6jx22e+40guIuM8IDwCGf3/2h+k3u Fhi8UJsPfY11GYog+DHpgdRpMmLQj3uc1tEiZQDZVK/gJ0zXNKtDTpKyme/Dg9I1PtxA z+1CGllosuM5JNFFGrUXf1UGg/fd4kzRIEuzUNe4xoKT1ASAa1S2QKdCFnITLNFxPwc/ T0CJy5VOWsUtgqHKWSF2e6AfpeNrN+u/u+ZfDgBMfn1Md5wHOBu20GkwbxE2n0QpxFBM yzEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G1jrBMXA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a17090a9bc300b0026815fe629esi5012297pjw.70.2023.07.25.08.04.09; Tue, 25 Jul 2023 08:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G1jrBMXA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231231AbjGYO47 (ORCPT + 99 others); Tue, 25 Jul 2023 10:56:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbjGYO46 (ORCPT ); Tue, 25 Jul 2023 10:56:58 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 064B6E63 for ; Tue, 25 Jul 2023 07:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690297016; x=1721833016; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=C6+c5ngyQlSR9n2/Vk/Z/wFT30T1Y1p1Gdxk/gwRU3g=; b=G1jrBMXAWSubNeQc3PMwKu7MbW7NK7I7AEY/VG68wZfGiNXUvXyWUAnx mdH+dDyJd4GloHeLKiavPcKcGxN5FZNU2dW+8GdoErbGK4xOPACEdTxeX VLUllCBjm80OiJil40jg0EwFnpCPvdItabgGf38ZjpMgaXlXXMms7/19M /5e88kpYeVPlr2YTjaGH8xWM6ledD8hUeSMMN9SLQbuxiDnrJSMjSUlxl s8iNvIzRWlK52/2YULlqZ8dIST8qigcqrUYKMfX9rhn3swE/LkVmUrL4y rrDC/mApwH5EYVoy8IP15EYx0UIM0y5PlksGU2FyeNSrKRh5HYqGlaX3k A==; X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="367776594" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="367776594" 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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