All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: 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
Date: Fri, 19 Sep 2025 15:38:23 -0700	[thread overview]
Message-ID: <20250919223823.GB44805@ax162> (raw)
In-Reply-To: <202509192041.tQwdE4DS-lkp@intel.com>

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

      reply	other threads:[~2025-09-19 22:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250919223823.GB44805@ax162 \
    --to=nathan@kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=lucas.demarchi@intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.