Re: [PATCH v8 12/13] cxl: Check if ULLONG_MAX was returned from translation functions
From: kernel test robot
Date: Thu Dec 11 2025 - 14:50:48 EST
Hi Robert,
kernel test robot noticed the following build warnings:
[auto build test WARNING on ea5514e300568cbe8f19431c3e424d4791db8291]
url: https://github.com/intel-lab-lkp/linux/commits/Robert-Richter/cxl-region-Rename-misleading-variable-name-hpa-to-hpa_range/20251210-021858
base: ea5514e300568cbe8f19431c3e424d4791db8291
patch link: https://lore.kernel.org/r/20251209180659.208842-13-rrichter%40amd.com
patch subject: [PATCH v8 12/13] cxl: Check if ULLONG_MAX was returned from translation functions
config: i386-randconfig-141-20251212 (https://download.01.org/0day-ci/archive/20251212/202512120346.aT9GKk20-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251212/202512120346.aT9GKk20-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/202512120346.aT9GKk20-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
In file included from include/linux/limits.h:7,
from include/linux/overflow.h:6,
from include/linux/string.h:13,
from include/linux/seq_file.h:6,
from drivers/cxl/core/hdm.c:3:
drivers/cxl/core/hdm.c: In function 'cxl_dpa_resource_start':
>> include/vdso/limits.h:16:25: warning: conversion from 'long long unsigned int' to 'resource_size_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' [-Woverflow]
16 | #define ULLONG_MAX (~0ULL)
| ^
drivers/cxl/core/hdm.c:533:32: note: in expansion of macro 'ULLONG_MAX'
533 | resource_size_t base = ULLONG_MAX;
| ^~~~~~~~~~
vim +16 include/vdso/limits.h
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 4
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 5 #define USHRT_MAX ((unsigned short)~0U)
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 6 #define SHRT_MAX ((short)(USHRT_MAX >> 1))
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 7 #define SHRT_MIN ((short)(-SHRT_MAX - 1))
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 8 #define INT_MAX ((int)(~0U >> 1))
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 9 #define INT_MIN (-INT_MAX - 1)
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 10 #define UINT_MAX (~0U)
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 11 #define LONG_MAX ((long)(~0UL >> 1))
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 12 #define LONG_MIN (-LONG_MAX - 1)
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 13 #define ULONG_MAX (~0UL)
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 14 #define LLONG_MAX ((long long)(~0ULL >> 1))
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 15 #define LLONG_MIN (-LLONG_MAX - 1)
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 @16 #define ULLONG_MAX (~0ULL)
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 17 #define UINTPTR_MAX ULONG_MAX
3e0e9f8c6e3ca9 Vincenzo Frascino 2020-03-20 18
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki