* [linux-next:master 9765/10654] drivers/gpu/drm/xe/tests/xe_pci.c:214:2: error: initializer element is not a compile-time constant
@ 2025-09-19 12:46 kernel test robot
2025-09-19 22:38 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-09-19 12:46 UTC (permalink / raw)
To: Michal Wajdeczko; +Cc: llvm, oe-kbuild-all, Lucas De Marchi
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8f7f8b1b3f4c613dd886f53f768f82816b41eaa3
commit: 5bb5258e357eb79719d1c998731b932c945cb52c [9765/10654] drm/xe/tests: Add pre-GMDID IP descriptors to param generators
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20250919/202509192041.tQwdE4DS-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250919/202509192041.tQwdE4DS-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509192041.tQwdE4DS-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/xe/xe_pci.c:1104:
>> drivers/gpu/drm/xe/tests/xe_pci.c:214:2: error: initializer element is not a compile-time constant
graphics_ip_xelp,
^~~~~~~~~~~~~~~~
drivers/gpu/drm/xe/tests/xe_pci.c:221:2: error: initializer element is not a compile-time constant
media_ip_xem,
^~~~~~~~~~~~
2 errors generated.
vim +214 drivers/gpu/drm/xe/tests/xe_pci.c
206
207 /*
208 * Pre-GMDID Graphics and Media IPs definitions.
209 *
210 * Mimic the way GMDID IPs are declared so the same
211 * param generator can be used for both
212 */
213 static const struct xe_ip pre_gmdid_graphics_ips[] = {
> 214 graphics_ip_xelp,
215 graphics_ip_xelpp,
216 graphics_ip_xehpg,
217 graphics_ip_xehpc,
218 };
219
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [linux-next:master 9765/10654] drivers/gpu/drm/xe/tests/xe_pci.c:214:2: error: initializer element is not a compile-time constant
2025-09-19 12:46 [linux-next:master 9765/10654] drivers/gpu/drm/xe/tests/xe_pci.c:214:2: error: initializer element is not a compile-time constant kernel test robot
@ 2025-09-19 22:38 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2025-09-19 22:38 UTC (permalink / raw)
To: kernel test robot; +Cc: Michal Wajdeczko, llvm, oe-kbuild-all, Lucas De Marchi
On Fri, Sep 19, 2025 at 08:46:43PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 8f7f8b1b3f4c613dd886f53f768f82816b41eaa3
> commit: 5bb5258e357eb79719d1c998731b932c945cb52c [9765/10654] drm/xe/tests: Add pre-GMDID IP descriptors to param generators
> config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20250919/202509192041.tQwdE4DS-lkp@intel.com/config)
> compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
^ key info
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250919/202509192041.tQwdE4DS-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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202509192041.tQwdE4DS-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/gpu/drm/xe/xe_pci.c:1104:
> >> drivers/gpu/drm/xe/tests/xe_pci.c:214:2: error: initializer element is not a compile-time constant
> graphics_ip_xelp,
> ^~~~~~~~~~~~~~~~
> drivers/gpu/drm/xe/tests/xe_pci.c:221:2: error: initializer element is not a compile-time constant
> media_ip_xem,
> ^~~~~~~~~~~~
> 2 errors generated.
>
>
> vim +214 drivers/gpu/drm/xe/tests/xe_pci.c
>
> 206
> 207 /*
> 208 * Pre-GMDID Graphics and Media IPs definitions.
> 209 *
> 210 * Mimic the way GMDID IPs are declared so the same
> 211 * param generator can be used for both
> 212 */
> 213 static const struct xe_ip pre_gmdid_graphics_ips[] = {
> > 214 graphics_ip_xelp,
> 215 graphics_ip_xelpp,
> 216 graphics_ip_xehpg,
> 217 graphics_ip_xehpc,
> 218 };
> 219
Prior to Clang 17 (and GCC 8 but that's not as much of a concern now
that this is the minimum supported version for building the kernel),
these structures would not be considered constant:
https://github.com/llvm/llvm-project/issues/44502
https://github.com/llvm/llvm-project/commit/0b2d5b967d98375793897295d651f58f6fbd3034
If this code cannot be modified to use pointers in a similar vein to
commit 17d49b7e47a1 ("power: supply: bq24190_charger: Fix "initializer
element is not constant" error"), this should probably be wrapped in
#if !defined(CONFIG_CC_IS_CLANG) || CONFIG_CLANG_VERSION >= 170000
Cheers,
Nathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-19 22:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 12:46 [linux-next:master 9765/10654] drivers/gpu/drm/xe/tests/xe_pci.c:214:2: error: initializer element is not a compile-time constant kernel test robot
2025-09-19 22:38 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox