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 20D3BC0015E for ; Tue, 25 Jul 2023 16:00:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B587F6B0074; Tue, 25 Jul 2023 12:00:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE0596B0075; Tue, 25 Jul 2023 12:00:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 959C38D0001; Tue, 25 Jul 2023 12:00:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7C40F6B0074 for ; Tue, 25 Jul 2023 12:00:17 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 27182120EA7 for ; Tue, 25 Jul 2023 16:00:17 +0000 (UTC) X-FDA: 81050596074.12.EBD55CA Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf27.hostedemail.com (Postfix) with ESMTP id DF54340024 for ; Tue, 25 Jul 2023 16:00:10 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Kc7bUnH+; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf27.hostedemail.com: domain of lkp@intel.com designates 192.55.52.115 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=1690300812; 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=COCQnZ94VJ9kcrhS6+3ZLX/VTz7q1QwSMXhATBvnqbs=; b=HNfb7rnpmxrjxHcTt6uWAlNBsYd5e6oJPvNlwnfeCG2+skyF6Vf8UVzPD3xkApzOLFtihb rCchXKhTymm/IFCQuQgU4Mj4SMsXl/qj8nw3BzevTRlQHla6zuJl22kErX8cfLPYhqvAC0 dZfnE2HRz9VvKYJrBVJdd6Zj4RvEy9o= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Kc7bUnH+; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf27.hostedemail.com: domain of lkp@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690300812; a=rsa-sha256; cv=none; b=byGjHW5+Hxg9YLeQCUUvQY8zRHg2AT3vgOU1P85Kiw+/9oAcBqiC9dJaFYY2tnSX5xei7k oqR31n99uerAIf/Ukbng08ElngywvembfrtZGuXVjMo9Ng4lhszY239Om4JbawyJSzcNBG SIlB+Zl7AxoPyqRJaNLfd9ZWPG4o8dk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690300811; x=1721836811; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=hwVaMZpylyqjbSlLNuQIT5HhTs+112ayYUlHlUKyMag=; b=Kc7bUnH+eR7DNAvXG6Fp4VeHmZVfhAEv3NhXuCpo6cZwIR0fa3dMFrVy fapUREfIyj6PLe9J6W9ygkGE3oRy+DfGYB38tQtKAAmn6IXMGcouJdAgo dx/j+gLoSkCpOnbGfML40Ezvr5jgvnAg20cxMN7Fdt4QOlHLPtHzvdn15 vnUw7zdWdanUSB6nL76P4pxzAadsvhnsiyIrUZ+O/9kaMo7PNLUKTILNP tR7MQ/O0mEaOsExIq9M3UHPbD3lpwp0pprtovZJEM3hBJ/bxMqIf6d+kH W+ImABNjQABVoHVqJ31xxw1KAVQtLaYi3eJdm3NYnHR+qHZweLbuWt6io w==; X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="367797254" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="367797254" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 08:59:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="676276296" X-IronPort-AV: E=Sophos;i="6.01,230,1684825200"; d="scan'208";a="676276296" Received: from lkp-server02.sh.intel.com (HELO 953e8cd98f7d) ([10.239.97.151]) by orsmga003.jf.intel.com with ESMTP; 25 Jul 2023 08:59:40 -0700 Received: from kbuild by 953e8cd98f7d with local (Exim 4.96) (envelope-from ) id 1qOKRU-00006x-2R; Tue, 25 Jul 2023 15:59:24 +0000 Date: Tue, 25 Jul 2023 23:58:22 +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: <202307252359.Is4T2MXC-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: DF54340024 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: umrpeegbznj4tm5mf8qo4st16w97yb6i X-HE-Tag: 1690300810-314171 X-HE-Meta: U2FsdGVkX190KoK9UW0wAB7MFKFXVT8u2Zpc9QhVaghq9e5x71QqkYdeIoMqR5bOtE70pQ64amGugZc7hnw0UHFEzEYgsoyGWA5Knimsk6NALmud9FZbJoBwi03DnEXEEyKDsgpqawihWXfjVewL6iQsCEdC6GzVUSXcBHUkH2UKmosmmuQctNIkPQmlNWYBtPVsNvOE7HhjjR9v3R2AGRK4Yo76v8ZPlSzrGgp8Ug0jQIDXW4kDm3jEfzhMk8WZXo+8dfssOy3htmTc92pTuJbR4BT+s5jQ9vrl9HOJV2W4QZHB/8I4H5NQOVk+oRMt8OLLIUr/QroSeTZ4MAISr4K6W5Q1L1aePypZ4oJpK+sdFiNDXcHpdU1jbSu4vI0XHrgvBVOUD7Rw63ZayXABPR2r88QDwGjf0Gxa7xXUx241b2NXw3aX1EHAD9H8wjX9Yz+YJpE6k8F5a8y7137b2ODxbCbf5Ag7SMrnyg3hl4qwPxXfFxVhFEJIvoARSIHIz5mSMnMh3cu5ayh7ByALTK5DR4eUrzPy+/3z2veOfKt2QzUA7X0iL0hTIN+nWEr6iqfsFr1gBtI1JvoyO3fRjaHVXYNO/u+Eb/lEfgjFtoxB5XeSUe0PWQlsPTpws1hW5ogxMgm+mrVo5UlY/q0KJqjH9M4pK9c7dGp6iOpVoJ349j/WoruzOMz52Jn76IEft/2V8WCge8t+yZuTjxotFRPQgd3TLZi3uuRL7050IJPwkifEocmCpzVllCiecuCyVk760Yf+jyvOyDk/oYn8z5r+0oXuksvLh66icH+tcVT6wrX2rz92Agcs5aUsQHFwknqamjxXRGMYRN7SZHml3LpIv8jwj9dl1+907ySa3YWGLDS/3Vqegdw2jQPgxzfI2yv0+SJp/Dr/U61koW51IPoU69KARIidvGkOq/XfJpuXyh6L3izTCBsSwDUoJZUYO9u15XztnM0iJWn5yDG vfDf3oCh jWlKtBR9jdJWIQMf7M7SrFp65GzVQTER58yYD2umkkaG9tkO5jr7+qkKiEuByLCgz+RMoEOdBbtQTAIMPWgCSC71gyPztvzN6L6XyOOUlUAa5jxIXw5FF/ajgT58b1i84Obp+70IExliFcAUoUC5UO/TBAN42wae4rvV8/JYErOYwNNCy0UhH5CUE6ENFsfSD5wC3OIZYS1SCGX0CcXSYOdNAChxaOPtSfOEa4omtpadx691K8rPpu3YwXnu9AHfSk+vT7vWBinUZPe+wmcHg0WaGB8R8nuKs0LGhWnxidWvZ6+vy8c8ZlKWGC97MS1JtGUe+ctehzL4pPCWkpkzFa7XI0Ses95BTW7MeXf0Gm4i2+msMHyQvxPf9fZCAOr1pcInelKXmxvJbDEaLm9xBI9gpSepqYdH/kuQ8v7lzipBFa3B2rCd1GereKKHOj9wV57YM1cYedn3qi5H7fxxA3zyZHg== 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-allnoconfig (https://download.01.org/0day-ci/archive/20230725/202307252359.Is4T2MXC-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230725/202307252359.Is4T2MXC-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/202307252359.Is4T2MXC-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from init/calibrate.c:8: >> include/linux/jiffies.h:427:28: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 427 | return jiffies_to_clock_t(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ In file included from init/calibrate.c:8: include/linux/jiffies.h:432:26: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 432 | return jiffies_to_msecs(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ 2 errors generated. -- In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:7: In file included from include/linux/ktime.h:25: >> include/linux/jiffies.h:427:28: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 427 | return jiffies_to_clock_t(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:7: In file included from include/linux/ktime.h:25: include/linux/jiffies.h:432:26: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 432 | return jiffies_to_msecs(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:10: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds] 97 | return (set->sig[3] | set->sig[2] | | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:10: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds] 97 | return (set->sig[3] | set->sig[2] | | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:10: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:98:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds] 98 | set->sig[1] | set->sig[0]) == 0; | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:10: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:100:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds] 100 | return (set->sig[1] | set->sig[0]) == 0; | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:10: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds] 113 | return (set1->sig[3] == set2->sig[3]) && | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:10: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds] 113 | return (set1->sig[3] == set2->sig[3]) && | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here 24 | unsigned long sig[_NSIG_WORDS]; | ^ In file included from fs/signalfd.c:22: In file included from include/linux/poll.h:10: -- In file included from kernel/irq/spurious.c:8: >> include/linux/jiffies.h:427:28: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 427 | return jiffies_to_clock_t(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ In file included from kernel/irq/spurious.c:8: include/linux/jiffies.h:432:26: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 432 | return jiffies_to_msecs(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ In file included from kernel/irq/spurious.c:9: 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] 547 | 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] 560 | 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' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from kernel/irq/spurious.c:9: 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] 573 | 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' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from kernel/irq/spurious.c:9: 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] 584 | __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] 594 | __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] 604 | __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] 692 | 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] 700 | 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] 708 | 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] 717 | 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] 726 | 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] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ 12 warnings and 2 errors generated. -- In file included from kernel/time/alarmtimer.c:16: In file included from include/linux/hrtimer.h:15: In file included from include/linux/hrtimer_defs.h:5: In file included from include/linux/ktime.h:25: >> include/linux/jiffies.h:427:28: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 427 | return jiffies_to_clock_t(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ In file included from kernel/time/alarmtimer.c:16: In file included from include/linux/hrtimer.h:15: In file included from include/linux/hrtimer_defs.h:5: In file included from include/linux/ktime.h:25: include/linux/jiffies.h:432:26: error: call to undeclared function 'static_assert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 432 | return jiffies_to_msecs(max(0L, delta)); | ^ include/linux/minmax.h:69:19: note: expanded from macro 'max' 69 | #define max(x, y) __careful_cmp(max, x, y) | ^ include/linux/minmax.h:36:3: note: expanded from macro '__careful_cmp' 36 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^ include/linux/minmax.h:29:3: note: expanded from macro '__cmp_once' 29 | static_assert(__types_ok(x, y), \ | ^ In file included from kernel/time/alarmtimer.c:18: In file included from include/linux/rtc.h:17: In file included from include/linux/interrupt.h:11: 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] 547 | 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] 560 | 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' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from kernel/time/alarmtimer.c:18: In file included from include/linux/rtc.h:17: In file included from include/linux/interrupt.h:11: 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] 573 | 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' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from kernel/time/alarmtimer.c:18: In file included from include/linux/rtc.h:17: In file included from include/linux/interrupt.h:11: 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] 584 | __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] 594 | __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] 604 | __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] 692 | 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] 700 | 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] 708 | 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] 717 | 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] 726 | 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] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ In file included from kernel/time/alarmtimer.c:18: In file included from include/linux/rtc.h:38: In file included from include/linux/seq_file.h:12: In file included from include/linux/fs.h:33: 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