* drivers/pci/rebar.c:142:31: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 140737488355328 to 0
@ 2026-11-25 10:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-25 10:26 UTC (permalink / raw)
To: Ilpo Järvinen ; +Cc: oe-kbuild-all, linux-kernel, Bjorn Helgaas
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4dce97c6c265544342e716e62fd24bbb232590c5
commit: 48f014356698a3525959a9eb343dc67b5a5c6842 PCI: Validate pci_rebar_size_supported() input
date: 1 year ago
config: s390-randconfig-r2101-20261125 (https://download.01.org/0day-ci/archive/20261125/20261125112105.GGL4bTAX-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project a2bea097c8bf336f31f45e88e96f20d88e37ff5a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261125/20261125112105.GGL4bTAX-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
| Fixes: 48f014356698 ("PCI: Validate pci_rebar_size_supported() input")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261125112105.GGL4bTAX-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pci/rebar.c:142:31: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 140737488355328 to 0 [-Wconstant-conversion]
142 | if (size < 0 || size > ilog2(SZ_128T) - ilog2(PCI_REBAR_MIN_SIZE))
| ~~~~~~^~~~~~~~
include/linux/sizes.h:70:20: note: expanded from macro 'SZ_128T'
70 | #define SZ_128T _AC(0x800000000000, ULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/const.h:21:18: note: expanded from macro '_AC'
21 | #define _AC(X,Y) __AC(X,Y)
| ^~~~~~~~~
include/uapi/linux/const.h:20:20: note: expanded from macro '__AC'
20 | #define __AC(X,Y) (X##Y)
| ^~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/log2.h:162:14: note: expanded from macro 'ilog2'
162 | __ilog2_u32(n) : \
| ~~~~~~~~~~~ ^
include/linux/compiler.h:55:47: note: expanded from macro 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~
include/linux/compiler.h:57:52: note: expanded from macro '__trace_if_var'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for OF_GPIO
Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
Selected by [y]:
- GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])
WARNING: unmet direct dependencies detected for I2C_K1
Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && OF [=n]
Selected by [y]:
- MFD_SPACEMIT_P1 [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && I2C [=y]
vim +142 drivers/pci/rebar.c
128
129 /**
130 * pci_rebar_size_supported - check if size is supported for BAR
131 * @pdev: PCI device
132 * @bar: BAR to check
133 * @size: encoded size as defined in the PCIe spec (0=1MB, 31=128TB)
134 *
135 * Return: %true if @bar is resizable and @size is supported, otherwise
136 * %false.
137 */
138 bool pci_rebar_size_supported(struct pci_dev *pdev, int bar, int size)
139 {
140 u64 sizes = pci_rebar_get_possible_sizes(pdev, bar);
141
> 142 if (size < 0 || size > ilog2(SZ_128T) - ilog2(PCI_REBAR_MIN_SIZE))
143 return false;
144
145 return BIT(size) & sizes;
146 }
147 EXPORT_SYMBOL_GPL(pci_rebar_size_supported);
148
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-25 10:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 10:26 drivers/pci/rebar.c:142:31: warning: implicit conversion from 'unsigned long long' to 'u32' (aka 'unsigned int') changes value from 140737488355328 to 0 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®