Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1208009rbb; Mon, 26 Feb 2024 02:06:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXP63Az1IpS0hnCB2ox7rkILDjBrOwfYyrU4z5OusMNJg5weQGHcOP7t77kiIA3ORd3WlCE1mf25ABXBNfkuTuyk+Yg83/TT+5lacFcuw== X-Google-Smtp-Source: AGHT+IGiaM1LWxXYREXj9VnYbZL3SuLZg81gpvfLcuwldv0uQgFCU0OGuezVUz2QzEW/wAV4wK0D X-Received: by 2002:a05:6871:878a:b0:21f:c7d8:fd0a with SMTP id td10-20020a056871878a00b0021fc7d8fd0amr8094391oab.33.1708941985740; Mon, 26 Feb 2024 02:06:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708941985; cv=pass; d=google.com; s=arc-20160816; b=rxLo4NZx7rz+EEwBKvRp7rrWCtlibaJCNkj9mhYOgSBRC1b3aEHnAqfNPip//ssEMP ZhwAAqQGb63Hx0Z9APsjpfMQuYtpYc1TRn90UQP7u5vCYFVKcyXpBkf/7EbduHFdJqGS risoOTsLk1P5PI5yXdKHB29OsNXktqvqpmGJ4Fe1VVpScCfjiDdjSrb7StkJMjC/KGd3 sodXIjRezDehxgYfOqVWxZfDSdUsA9pfchyYoSL+VnOkUZpPf4ruI8P+pF0kXuxpri3N IOYafENVIW2sBOUzbPOI15FVjGOObT46sAc20D2uqJRyHfZHid1VuNk7dnBja6DvEjZT 2Ffw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Q2UQh1WYj0+ECTnn1oMt8+y1Ms84JHklrPj0XTTExb0=; fh=neeFxXoPxiAUdL4fWCCHg96Z8qBUVsOR3binM4+nze4=; b=Qh2ng80HOApd76qeN7r6pfHCuezTyNNViadKBWLyqnIlRgWSX9WoFqIQE67ZNOR1e6 3x5YTNelBs5OZ3kwSmEjk8uEydTVDRlf+miFIKj7Ta6IjhQ69zWo2yjFFeMTkKPo1qe3 PWX7py5MhFj6BtFUzjHCTpn6d1cSRxmZ7XOQDSkl6NfV8CxAyGU+WeyVrb8GgzkymKGT M9ah2uAwjyj7Zl38TIvlDkZJaE5co85v9GMAZ5vtqFDMbW+6TXzq/RdbrcHZHGyfC89t QwPZ5HBBdLneKdSS79kxMMXREd/ze4Vf/KvyvXivUX4Cc3Txys2LNL+6QD9/ujeBTLXE qyfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HXNvFhKf; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-81080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vy5-20020a05620a490500b007871659b840si4534563qkn.496.2024.02.26.02.06.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 02:06:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HXNvFhKf; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-81080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6C3201C241D4 for ; Mon, 26 Feb 2024 10:06:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E23F1604AE; Mon, 26 Feb 2024 09:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HXNvFhKf" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 113FC6024F; Mon, 26 Feb 2024 09:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940591; cv=none; b=gqaJeQm7ciWhCskSewRaIvMA9ikijAKWJa17X2uoVMzZLg1pNq3iwJj5QDZd1pcDc977bghSskbmuSyWJ8hOzkJqV/VjPV2L35Gl1bacgpY5PXbKWAF9qvejs4GU9OVowSxZyE8E3tN+GRqe/Ub7BdTmujv1/0UBFPxQKiUc310= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708940591; c=relaxed/simple; bh=peeh3uBT6rkaZj0IWaTOnmOqCf87o+9OlPo0K0aPohw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ugF4KSDhZ/fcUWaDLy7cffkxNU/HwxVb8d9es4nnR7Lp73dDVy3yafpCL7EoqqSuirDJ3qw56wbVxma+ZULbj6JPACwnhu/+j2ChO8tg1dCM4elB0bPGJbqeI89lE+fBSxgeTuFBgCiL9tj1bxmg7+uvdFMF4AW7aZ9VcY6kLi4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HXNvFhKf; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708940590; x=1740476590; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=peeh3uBT6rkaZj0IWaTOnmOqCf87o+9OlPo0K0aPohw=; b=HXNvFhKf+bHFH3XaVKlF/uYyCSLx0vGwogKBu1T9CZUMiqlYe0DgA1Pp h0RagLTVhmBJzE6WIyW6cWSRn/8aS6rdact470i2eCFXg9MVWyqEerUy/ WxibEHwPwm0HNONhTc2pmKyRMD0eDhr1OaUBZLEIcYzxDmj9LMQfaIHaY zoZ3Y4MVlDEZsqJVhitgHCNpIkZ8eq0q11XN51zbYpJf3qd2pQ82ksBVO ZRgOaBiJqMt0hX4bB50fzvy8ztZkDfDeLkgmhXpk3avYp0saPnXUfbD87 wHaavXRiRxK6NIn8i9hvruBtlrjjGOkuNS1gmFwond9cft6ke0P7E0i5z A==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="14346765" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="14346765" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 01:43:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="11201013" Received: from lkp-server02.sh.intel.com (HELO 3c78fa4d504c) ([10.239.97.151]) by fmviesa003.fm.intel.com with ESMTP; 26 Feb 2024 01:43:05 -0800 Received: from kbuild by 3c78fa4d504c with local (Exim 4.96) (envelope-from ) id 1reXVn-000AE7-0w; Mon, 26 Feb 2024 09:43:03 +0000 Date: Mon, 26 Feb 2024 17:42:13 +0800 From: kernel test robot To: David Laight , "'linux-kernel@vger.kernel.org'" , 'Linus Torvalds' , 'Netdev' , "'dri-devel@lists.freedesktop.org'" Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, 'Jens Axboe' , "'Matthew Wilcox (Oracle)'" , 'Christoph Hellwig' , "'linux-btrfs@vger.kernel.org'" , 'Andrew Morton' , Linux Memory Management List , 'Andy Shevchenko' , "'David S . Miller'" , 'Dan Carpenter' , 'Jani Nikula' Subject: Re: [PATCH next v2 11/11] minmax: min() and max() don't need to return constant expressions Message-ID: <202402261720.EAMC0eHM-lkp@intel.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi David, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on linux/master mkl-can-next/testing kdave/for-next akpm-mm/mm-nonmm-unstable linus/master v6.8-rc6] [cannot apply to next-20240223 dtor-input/next dtor-input/for-linus axboe-block/for-next horms-ipvs/master next-20240223] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Put-all-the-clamp-definitions-together/20240226-005902 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/a18dcae310f74dcb9c6fc01d5bdc0568%40AcuMS.aculab.com patch subject: [PATCH next v2 11/11] minmax: min() and max() don't need to return constant expressions config: i386-buildonly-randconfig-001-20240226 (https://download.01.org/0day-ci/archive/20240226/202402261720.EAMC0eHM-lkp@intel.com/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240226/202402261720.EAMC0eHM-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/202402261720.EAMC0eHM-lkp@intel.com/ All warnings (new ones prefixed by >>): >> arch/x86/mm/pgtable.c:437:14: warning: variable length array used [-Wvla] 437 | pmd_t *pmds[MAX_PREALLOCATED_PMDS]; | ^~~~~~~~~~~~~~~~~~~~~ arch/x86/mm/pgtable.c:180:31: note: expanded from macro 'MAX_PREALLOCATED_PMDS' 180 | #define MAX_PREALLOCATED_PMDS MAX_UNSHARED_PTRS_PER_PGD | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/mm/pgtable.c:113:2: note: expanded from macro 'MAX_UNSHARED_PTRS_PER_PGD' 113 | max_t(size_t, KERNEL_PGD_BOUNDARY, PTRS_PER_PGD) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:152:27: note: expanded from macro 'max_t' 152 | #define max_t(type, x, y) __careful_cmp(max, (type)(x), (type)(y), __COUNTER__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:62:2: note: expanded from macro '__careful_cmp' 59 | #define __careful_cmp(op, x, y, uniq) ({ \ | ~~~~~~~~~~~ 60 | _Static_assert(__types_ok(x, y), \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 61 | #op "(" #x ", " #y ") signedness error, fix types or consider u" #op "() before " #op "_t()"); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 | __cmp_once(op, x, y, uniq); }) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:57:2: note: expanded from macro '__cmp_once' 57 | __cmp(op, __x_##uniq, __y_##uniq); }) | ^ include/linux/minmax.h:52:26: note: expanded from macro '__cmp' 52 | #define __cmp(op, x, y) ((x) __cmp_op_##op (y) ? (x) : (y)) | ^ 1 warning generated. vim +437 arch/x86/mm/pgtable.c 1db491f77b6ed0 Fenghua Yu 2015-01-15 432 d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 433 pgd_t *pgd_alloc(struct mm_struct *mm) 1ec1fe73dfb711 Ingo Molnar 2008-03-19 434 { d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 435 pgd_t *pgd; 184d47f0fd3651 Kees Cook 2018-10-08 436 pmd_t *u_pmds[MAX_PREALLOCATED_USER_PMDS]; 184d47f0fd3651 Kees Cook 2018-10-08 @437 pmd_t *pmds[MAX_PREALLOCATED_PMDS]; 1ec1fe73dfb711 Ingo Molnar 2008-03-19 438 1db491f77b6ed0 Fenghua Yu 2015-01-15 439 pgd = _pgd_alloc(); 1ec1fe73dfb711 Ingo Molnar 2008-03-19 440 d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 441 if (pgd == NULL) d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 442 goto out; 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 443 d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 444 mm->pgd = pgd; 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 445 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 446 if (sizeof(pmds) != 0 && 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 447 preallocate_pmds(mm, pmds, PREALLOCATED_PMDS) != 0) d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 448 goto out_free_pgd; d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 449 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 450 if (sizeof(u_pmds) != 0 && 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 451 preallocate_pmds(mm, u_pmds, PREALLOCATED_USER_PMDS) != 0) d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 452 goto out_free_pmds; d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 453 f59dbe9ca6707e Joerg Roedel 2018-07-18 454 if (paravirt_pgd_alloc(mm) != 0) f59dbe9ca6707e Joerg Roedel 2018-07-18 455 goto out_free_user_pmds; f59dbe9ca6707e Joerg Roedel 2018-07-18 456 d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 457 /* d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 458 * Make sure that pre-populating the pmds is atomic with d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 459 * respect to anything walking the pgd_list, so that they d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 460 * never see a partially populated pgd. d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 461 */ a79e53d85683c6 Andrea Arcangeli 2011-02-16 462 spin_lock(&pgd_lock); 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 463 617d34d9e5d832 Jeremy Fitzhardinge 2010-09-21 464 pgd_ctor(mm, pgd); 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 465 if (sizeof(pmds) != 0) d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 466 pgd_prepopulate_pmd(mm, pgd, pmds); 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 467 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 468 if (sizeof(u_pmds) != 0) f59dbe9ca6707e Joerg Roedel 2018-07-18 469 pgd_prepopulate_user_pmd(mm, pgd, u_pmds); 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 470 a79e53d85683c6 Andrea Arcangeli 2011-02-16 471 spin_unlock(&pgd_lock); 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 472 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 473 return pgd; d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 474 f59dbe9ca6707e Joerg Roedel 2018-07-18 475 out_free_user_pmds: 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 476 if (sizeof(u_pmds) != 0) f59dbe9ca6707e Joerg Roedel 2018-07-18 477 free_pmds(mm, u_pmds, PREALLOCATED_USER_PMDS); d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 478 out_free_pmds: 25226df4b9be7f Gustavo A. R. Silva 2022-09-21 479 if (sizeof(pmds) != 0) f59dbe9ca6707e Joerg Roedel 2018-07-18 480 free_pmds(mm, pmds, PREALLOCATED_PMDS); d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 481 out_free_pgd: 1db491f77b6ed0 Fenghua Yu 2015-01-15 482 _pgd_free(pgd); d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 483 out: d8d5900ef8afc5 Jeremy Fitzhardinge 2008-06-25 484 return NULL; 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 485 } 4f76cd382213b2 Jeremy Fitzhardinge 2008-03-17 486 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki