Re: [PATCH 2/4 v5] cxl/core: Add helpers to detect Low Memory Holes on x86

From: kernel test robot
Date: Fri Oct 10 2025 - 10:50:11 EST


Hi Fabio,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 46037455cbb748c5e85071c95f2244e81986eb58]

url: https://github.com/intel-lab-lkp/linux/commits/Fabio-M-De-Francesco/cxl-core-Change-match_-_by_range-signatures/20251010-111627
base: 46037455cbb748c5e85071c95f2244e81986eb58
patch link: https://lore.kernel.org/r/20251006155836.791418-3-fabio.m.de.francesco%40linux.intel.com
patch subject: [PATCH 2/4 v5] cxl/core: Add helpers to detect Low Memory Holes on x86
config: i386-randconfig-011-20251010 (https://download.01.org/0day-ci/archive/20251010/202510102229.iFcGqbMH-lkp@xxxxxxxxx/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251010/202510102229.iFcGqbMH-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510102229.iFcGqbMH-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/cxl/core/platform_quirks.c:70:36: warning: result of comparison of constant 4294967296 with expression of type 'const resource_size_t' (aka 'const unsigned int') is always true [-Wtautological-constant-out-of-range-compare]
70 | res->end < r->end && res->end < (LMH_CFMWS_RANGE_START + SZ_4G) &&
| ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.


vim +70 drivers/cxl/core/platform_quirks.c

50
51 /**
52 * platform_region_matches_cxld() - Platform quirk to match a CXL Region and a
53 * Switch or Endpoint Decoder. It allows matching on platforms with LMH's.
54 * @p: Region Params against which @cxled is matched.
55 * @cxld: Switch or Endpoint Decoder to be tested for matching @p.
56 *
57 * Similar to platform_cxlrd_matches_cxled(), it matches regions and
58 * decoders on platforms with LMH's.
59 *
60 * Return: true if a Decoder matches a Region, else false.
61 */
62 bool platform_region_matches_cxld(const struct cxl_region_params *p,
63 const struct cxl_decoder *cxld)
64 {
65 const struct range *r = &cxld->hpa_range;
66 const struct resource *res = p->res;
67 int align = cxld->interleave_ways * SZ_256M;
68
69 if (res->start == LMH_CFMWS_RANGE_START && res->start == r->start &&
> 70 res->end < r->end && res->end < (LMH_CFMWS_RANGE_START + SZ_4G) &&
71 IS_ALIGNED(range_len(r), align))
72 return true;
73
74 return false;
75 }
76

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki