From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 7ABBC63A9; Sat, 1 Mar 2025 01:24:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740792291; cv=none; b=mu+2QTFmu+B9z7IPUqihLivxKHTbn36wppjTLsk7pCNf1+4kpFkHPSKmU3skijyqWWUtqIZL83i9d0bcCxTWv+jqPtorF4zg57g1+VpbK87E6mUZLp/dW/JLDvLCnawcShofjhTSnLVuVxPdtG+Z76fCGShi6mrZkwYB9vWfmnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740792291; c=relaxed/simple; bh=5nOsIwHbbcbLoA3xmRhsRYuQAs3fWV0c4VOuHUGKw3o=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=VExHNwyX8km5JTfx9gp0+eQMQlui5WIFo4IVa6xDiMnRv7BqKHHvCfg0ShRE9DY0AQwEvYhfaHUHaN+WGww/F79s0GzIKzl27PzReJnso1VqReAIf+JkLirPNmKc5XAFv28f/YbQIfJYYvtvojpk08SwJN6l9U375jsVdISB3BA= 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=CnfgnKyk; arc=none smtp.client-ip=192.198.163.17 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CnfgnKyk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740792290; x=1772328290; h=date:from:to:cc:subject:message-id:mime-version; bh=5nOsIwHbbcbLoA3xmRhsRYuQAs3fWV0c4VOuHUGKw3o=; b=CnfgnKyk5JtaaGbvJ0+UYV2PC0RuhiVD8QfvMFN7IjS+JIMyJPsgNFCB C48Qh/Lg5quWtir8BoxzQ5L74UhAf7XpNsr4KlwbViUqMdRUu/E28QgSb dFwpczJwlIPKyjwoA48h3S0r563RxqFAny7p3CHnqPIqQ3tY49oOKWZ0n nBKnFFDmYYcv5E+WqXKxYA71/ODlejl+ekeflz8u3etkup2ApsvsOfPiC NdBbA2wzI7Akffw2TvXliKvSWXsORIHaKWz2qr76gvTFsntJNCIgMibpT G8z1UMHXf6ML3x9bW6dtC+Bxzq2UmAysmxdFOacHSTc1xD8e81c4YOPuV Q==; X-CSE-ConnectionGUID: qFldSJV5TVivTYMi9ScT+g== X-CSE-MsgGUID: d42X/z3oSaap+nHuj83RMQ== X-IronPort-AV: E=McAfee;i="6700,10204,11359"; a="41619046" X-IronPort-AV: E=Sophos;i="6.13,324,1732608000"; d="scan'208";a="41619046" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2025 17:24:49 -0800 X-CSE-ConnectionGUID: x8x86C9qS+C/yhTEgObFDA== X-CSE-MsgGUID: 6mj10fIJQsKTP8yTF4UhHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,324,1732608000"; d="scan'208";a="122097547" Received: from lkp-server02.sh.intel.com (HELO 76cde6cc1f07) ([10.239.97.151]) by fmviesa005.fm.intel.com with ESMTP; 28 Feb 2025 17:24:47 -0800 Received: from kbuild by 76cde6cc1f07 with local (Exim 4.96) (envelope-from ) id 1toBau-000FiI-39; Sat, 01 Mar 2025 01:24:44 +0000 Date: Sat, 1 Mar 2025 09:24:24 +0800 From: kernel test robot To: Huang Ying Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Andrew Morton , Linux Memory Management List Subject: kernel/resource.c:1838:43: warning: implicit conversion from 'unsigned long long' to 'resource_size_t' (aka 'unsigned int') changes value from 68719476735 to 4294967295 Message-ID: <202503010926.R1fZJVo3-lkp@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Huang, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5c44ddaf7df3a06391684dde65083a092e06052b commit: 99185c10d5d9214d0d0c8b7866660203e344ee3b resource, kunit: add test case for region_intersects() date: 6 months ago config: arm-randconfig-001-20241228 (https://download.01.org/0day-ci/archive/20250301/202503010926.R1fZJVo3-lkp@intel.com/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250301/202503010926.R1fZJVo3-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/202503010926.R1fZJVo3-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/resource.c:1838:43: warning: implicit conversion from 'unsigned long long' to 'resource_size_t' (aka 'unsigned int') changes value from 68719476735 to 4294967295 [-Wconstant-conversion] end = min_t(resource_size_t, base->end, MAX_PHYS_ADDR); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ kernel/resource.c:1827:52: note: expanded from macro 'MAX_PHYS_ADDR' #define MAX_PHYS_ADDR ((1ULL << MAX_PHYSMEM_BITS) - 1) ^ include/linux/minmax.h:213:52: note: expanded from macro 'min_t' #define min_t(type, x, y) __cmp_once(min, type, x, y) ~~~~~~~~~~~~~~~~~~~~~~~~~^~ include/linux/minmax.h:96:33: note: expanded from macro '__cmp_once' __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:93:31: note: expanded from macro '__cmp_once_unique' ({ type ux = (x); type uy = (y); __cmp(op, ux, uy); }) ~~ ^ kernel/resource.c:1855:45: warning: implicit conversion from 'unsigned long long' to 'resource_size_t' (aka 'unsigned int') changes value from 68719476735 to 4294967295 [-Wconstant-conversion] addr <= min_t(resource_size_t, base->end, MAX_PHYS_ADDR); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ kernel/resource.c:1827:52: note: expanded from macro 'MAX_PHYS_ADDR' #define MAX_PHYS_ADDR ((1ULL << MAX_PHYSMEM_BITS) - 1) ^ include/linux/minmax.h:213:52: note: expanded from macro 'min_t' #define min_t(type, x, y) __cmp_once(min, type, x, y) ~~~~~~~~~~~~~~~~~~~~~~~~~^~ include/linux/minmax.h:96:33: note: expanded from macro '__cmp_once' __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:93:31: note: expanded from macro '__cmp_once_unique' ({ type ux = (x); type uy = (y); __cmp(op, ux, uy); }) ~~ ^ 2 warnings generated. vim +1838 kernel/resource.c 1831 1832 static resource_size_t gfr_start(struct resource *base, resource_size_t size, 1833 resource_size_t align, unsigned long flags) 1834 { 1835 if (flags & GFR_DESCENDING) { 1836 resource_size_t end; 1837 > 1838 end = min_t(resource_size_t, base->end, MAX_PHYS_ADDR); 1839 return end - size + 1; 1840 } 1841 1842 return ALIGN(max(base->start, align), align); 1843 } 1844 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki