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 E7FDDEB64DD for ; Fri, 28 Jul 2023 21:43:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 65FA08D0001; Fri, 28 Jul 2023 17:43:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 60FAA6B0074; Fri, 28 Jul 2023 17:43:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B03D8D0001; Fri, 28 Jul 2023 17:43:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 36F856B0071 for ; Fri, 28 Jul 2023 17:43:32 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E862CA0416 for ; Fri, 28 Jul 2023 21:43:31 +0000 (UTC) X-FDA: 81062347422.09.440C5E8 Received: from mgamail.intel.com (unknown [192.55.52.88]) by imf30.hostedemail.com (Postfix) with ESMTP id D11A480017 for ; Fri, 28 Jul 2023 21:43:28 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=MLSwEFMq; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690580610; a=rsa-sha256; cv=none; b=MAPqle8QOB5toLnweBYtI6bp1JCNpWd1jaDG0AeDdL5Mm/DCNmIELlTd76X+bZ6Co6CqAX T/5rECTGLtM8aXgvmcwviItpD6J4S42GMyyIiRxDhTJilBZ6ySQMMCXuWvLuAcT4bkbplG AwGNrOXYzv/1VzPsA58De+MXci6QwVk= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=MLSwEFMq; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 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=1690580610; 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=PYnghh/ktljgFAmZsGO3LuzaiQRFzA3fmbTPzgJdkT0=; b=MMEqiePUfEHEjd1B25r/RSG4N6CCXT7qB3NG1XkWMAHMzuGS+8vypplkKNh5UoK8ni+UT1 qQRSbkFQClAk58CdqouuNOJJFxaVu2dt5lMmTqq5BboKE63Na7aXyqjNNG3yuHT3FeA9D6 ZHMxTfwmYdRv3catBOs6bRa2THetz1g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690580608; x=1722116608; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=l2SIOwdyJe7pKrIf+axHOJKpkjE1OPCRQYiSHCcJQaM=; b=MLSwEFMqAgOEQVeeDnusDdIWHtv7yorOATpUK0iqYnI2x2G3bR+y0H0Q Sc3keTPJuMT0npsLgFFNhTKYVJR23/JnvmuUytpBA+CVVbBeeo3ZUslrR 9qUcnq30TjAwpgsP0a9FaFvt5Pza6FGYR3roStp6AULfUZk/DGzM2s5LU xMy6b6c+SArMnMoEBObhc3agvdzqS3Evj87yjBRnYhWzPM+xDnKoPY1sl vOPTLSEK+LBUA/ZB4RIOWLtcc+iJndnkCpuC+sNEazZymBDu3nDw393IM FdsCnC7hYfqK6zzTnt0CZLHnnqn2JkMDf1gwqbTmxsFu0GzMOsRBoek/w A==; X-IronPort-AV: E=McAfee;i="6600,9927,10785"; a="399631797" X-IronPort-AV: E=Sophos;i="6.01,238,1684825200"; d="scan'208";a="399631797" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2023 14:43:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10785"; a="677642258" X-IronPort-AV: E=Sophos;i="6.01,238,1684825200"; d="scan'208";a="677642258" Received: from lkp-server02.sh.intel.com (HELO 953e8cd98f7d) ([10.239.97.151]) by orsmga003.jf.intel.com with ESMTP; 28 Jul 2023 14:43:23 -0700 Received: from kbuild by 953e8cd98f7d with local (Exim 4.96) (envelope-from ) id 1qPVF4-0003bD-2U; Fri, 28 Jul 2023 21:43:22 +0000 Date: Sat, 29 Jul 2023 05:43:20 +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: oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [PATCH next v2 5/5] minmax: Relax check to allow comparison between int and small unsigned constants. Message-ID: <202307290538.EtRKfGgC-lkp@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: D11A480017 X-Stat-Signature: ux4ebtsa16di99sz5rgxnmig3sz1k5sa X-Rspam-User: X-HE-Tag: 1690580608-274350 X-HE-Meta: U2FsdGVkX1/DDMoPnrIYLWid8hj7cx6UCHok0ze47xvUyipqfHKXzWNz8lfRj7R0FzE0zpECXh8Jzi4lsyHIgDfsW4RbZg2RiCDshWI0dXHJAxy1F+y1H4sgx5tOIYtT49OIKtHNvUFRFkSsgUpyuUxja+x733k/p00Y7TJQo6XL268OVKotWELbiqf1FaCUpmWxiiVvpYuOnnB7ws7lxgvVMDIf7RgkL3Ri8NG1IYK/WLQVMwGCpLYjrfK5M63GgwU/I+djVa5rGeGOsjakBfxc8piHJs8HTscKADyVJ1WntjfKeYnQFPhJiJw5iELD/qPAxygoKzqNxrYi7gaaaDkSIiES46bgOdpa47yHjYDDP+C6eedH1j7duVzq5imqk01QQ2ObEmxgrQcXESuVYFgjg04FcYQdgK1n20rTTFVt5DeE01c9xsfQEeeitz7rx0faU0UkWPTLvi6Q96RE7cybDXfIkdtpZPg7toy+/9gRanNhihfwUzdSveOz5KActUlVVp9jl3o5l7rZXdy4Nd1xr6j/UDdUOdHEdPp4mpsJt7/fNMbT3OstBjWzwvN8dNat+LXV4FJsEKQI/RZE9hI4qkH8B8Y9tx+hOAUSnmYgwv3Wle8BONjfHKhE+9Ty79EFmHw3+Qtj089mz/fgEEXAkvLjliK1UgZiEvm7dqXYPV099ouKu/I+m8O2EtBi2Px85txcALCFkpyvkC59zKp9pGJy9QvJU6ZgDnU51DxflmDkp3Fo8eOdlo4hCauk8NQtrkfkcJK2z4kCb8lcGpmvKInMd2oBzhHBGnKBojWiot3GMjAqIVbEVAT6627xR4a1PNOlHXW/3iFbOtb8JgtUx68R5wCxecs0M+IME20J1Hb+GOb0BRIBAGvO9bPirOoff01hIeABfyT/v4uVKRkgFG7zQMVO3h2KZ90gjt9+ODQaeUlGu8ZXq2oKQvzZzTutyoHd0qTogs5DumJ Ck1WoC3r jFp6jV/3o1sxiZTawMsfSzOTFc8NHA+iqln+N7yH80VgPG1qddfuW57laj57QnUeEXR6Ft/z7kOCQku/48+Wm+jFlcIwaicNAHtuVDRB43uX9pA9dmO/TyTG7pye5J3KWD4gw9/H/lqIWKswiWb/TlfX5t4e0SjAZ7vY15qBkY0ISs/ThrPaXT0njczvyCx2I2yBO0uHVd/dCaoZUS1jDxNGFKONaTAzPGY4KEBb7J1gOU7mcNT9Itl3Lp3Zqc/jd0WnADuwZOZu4a8WoZ0PtKbZQ9AxpSJckIwJU8lLfo/x5bNHLtBKNamg7t9KYre1L/FyoYn1pNj8z2rVl97WLyU35WEurbDpeS5/sYb6elh3g2djsH0jKG6vzC5RunxBgc06JQ+I06tjUUxqU/tVVyflsKrWvOsVy25EAo7GTz2LSjzZ9ts0Az9EzXkIxKEoaJXmF2aXnusRMbKCBB91colK6jzM3aI769GA5 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 warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728] [cannot apply to next-20230728] [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/20230728-225439 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/b4ce9dad748e489f9314a2dc95615033%40AcuMS.aculab.com patch subject: [PATCH next v2 5/5] minmax: Relax check to allow comparison between int and small unsigned constants. config: alpha-randconfig-r024-20230727 (https://download.01.org/0day-ci/archive/20230729/202307290538.EtRKfGgC-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290538.EtRKfGgC-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/202307290538.EtRKfGgC-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:27, from include/linux/cpumask.h:10, from include/linux/mm_types_task.h:14, from include/linux/mm_types.h:5, from include/linux/buildid.h:5, from include/linux/module.h:14, from net/ceph/osdmap.c:5: net/ceph/osdmap.c: In function 'osdmap_decode': >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:27: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:27: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:45: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:43: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:51: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:27: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:57: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:43: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:42:16: note: in expansion of macro '__int_const' 42 | typeof(__int_const(x)) unique_x = (x); \ | ^~~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:43:16: note: in expansion of macro '__int_const' 43 | typeof(__int_const(y)) unique_y = (y); \ | ^~~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ In file included from include/linux/container_of.h:5, from include/linux/list.h:5, from include/linux/module.h:12: >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/minmax.h:44:9: note: in expansion of macro 'static_assert' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~~~~ include/linux/minmax.h:34:17: note: in expansion of macro '__is_noneg_int' 34 | __is_noneg_int(x) || __is_noneg_int(y)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:44:23: note: in expansion of macro '__types_ok' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/minmax.h:44:9: note: in expansion of macro 'static_assert' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~~~~ include/linux/minmax.h:34:38: note: in expansion of macro '__is_noneg_int' 34 | __is_noneg_int(x) || __is_noneg_int(y)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:44:23: note: in expansion of macro '__types_ok' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:1773:54: note: in expansion of macro 'min' 1773 | err = osdmap_set_crush(map, crush_decode(*p, min(*p + len, end))); | ^~~ net/ceph/osdmap.c: In function 'osdmap_apply_incremental': >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:27: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:27: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:45: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:43: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:51: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:27: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:57: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:43: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:42:16: note: in expansion of macro '__int_const' 42 | typeof(__int_const(x)) unique_x = (x); \ | ^~~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:43:16: note: in expansion of macro '__int_const' 43 | typeof(__int_const(y)) unique_y = (y); \ | ^~~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/minmax.h:44:9: note: in expansion of macro 'static_assert' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~~~~ include/linux/minmax.h:34:17: note: in expansion of macro '__is_noneg_int' 34 | __is_noneg_int(x) || __is_noneg_int(y)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:44:23: note: in expansion of macro '__types_ok' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/minmax.h:44:9: note: in expansion of macro 'static_assert' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~~~~ include/linux/minmax.h:34:38: note: in expansion of macro '__is_noneg_int' 34 | __is_noneg_int(x) || __is_noneg_int(y)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:44:23: note: in expansion of macro '__types_ok' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2000:46: note: in expansion of macro 'min' 2000 | return ceph_osdmap_decode(p, min(*p+len, end), msgr2); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:27: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:27: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:45: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:43: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:51: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:27: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); | ^~~ >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:39:57: note: in definition of macro '__cmp' 39 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:50:43: note: in expansion of macro '__int_const' 50 | __cmp(op, __int_const(x), __int_const(y)), \ | ^~~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); | ^~~ include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:42:16: note: in expansion of macro '__int_const' 42 | typeof(__int_const(x)) unique_x = (x); \ | ^~~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); | ^~~ include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/minmax.h:28:47: note: in expansion of macro '__is_noneg_int' 28 | #define __int_const(x) __builtin_choose_expr(__is_noneg_int(x), (int)(long)(x), (x)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:43:16: note: in expansion of macro '__int_const' 43 | typeof(__int_const(y)) unique_y = (y); \ | ^~~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); | ^~~ include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/minmax.h:44:9: note: in expansion of macro 'static_assert' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~~~~ include/linux/minmax.h:34:17: note: in expansion of macro '__is_noneg_int' 34 | __is_noneg_int(x) || __is_noneg_int(y)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:44:23: note: in expansion of macro '__types_ok' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); | ^~~ include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra] 26 | ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/minmax.h:44:9: note: in expansion of macro 'static_assert' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~~~~ include/linux/minmax.h:34:38: note: in expansion of macro '__is_noneg_int' 34 | __is_noneg_int(x) || __is_noneg_int(y)) | ^~~~~~~~~~~~~~ include/linux/minmax.h:44:23: note: in expansion of macro '__types_ok' 44 | static_assert(__types_ok(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:51:17: note: in expansion of macro '__cmp_once' 51 | __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))) | ^~~~~~~~~~ include/linux/minmax.h:78:25: note: in expansion of macro '__careful_cmp' 78 | #define min(x, y) __careful_cmp(min, x, y) | ^~~~~~~~~~~~~ net/ceph/osdmap.c:2007:57: note: in expansion of macro 'min' 2007 | crush_decode(*p, min(*p + len, end))); .. vim +26 include/linux/minmax.h 7 8 /* 9 * min()/max()/clamp() macros must accomplish three things: 10 * 11 * - Avoid multiple evaluations of the arguments (so side-effects like 12 * "x++" happen only once) when non-constant. 13 * - Perform signed v unsigned type-checking (to generate compile 14 * errors instead of nasty runtime surprises). 15 * Constants from 0 to INT_MAX are cast to (int) so can be used 16 * in comparisons with signed types. 17 * - Retain result as a constant expressions when called with only 18 * constant expressions (to avoid tripping VLA warnings in stack 19 * allocation usage). 20 */ 21 #define __typecheck(x, y) \ 22 (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) 23 24 #define __is_noneg_int(x) \ 25 __builtin_choose_expr(!__is_constexpr(x), false, \ > 26 ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__)) 27 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki