tree:
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git devicemsi
head: 67d94e5e316843b1af2b0c4cf5d4f8e9a91d97b4
commit: c788f3e806861afdef54db59dc5be9afb5bc906f [18/38] x86/irq: Initialize PCI/MSI
domain at PCI init time
config: x86_64-randconfig-a002-20200820 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
b587ca93be114d07ec3bf654add97d7872325281)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout c788f3e806861afdef54db59dc5be9afb5bc906f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> arch/x86/kernel/apic/msi.c:247:6: warning: variable 'd'
is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (fn) {
^~
arch/x86/kernel/apic/msi.c:251:7: note: uninitialized use occurs here
if (!d) {
^
arch/x86/kernel/apic/msi.c:247:2: note: remove the 'if' if its condition is
always true
if (fn) {
^~~~~~~~
arch/x86/kernel/apic/msi.c:241:22: note: initialize the variable 'd' to silence
this warning
struct irq_domain *d;
^
= NULL
1 warning generated.
#
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git/commit/?id...
git remote add tglx-devel
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
git fetch --no-tags tglx-devel devicemsi
git checkout c788f3e806861afdef54db59dc5be9afb5bc906f
vim +247 arch/x86/kernel/apic/msi.c
443809828cb5ee0 Jiang Liu 2014-10-27 237
c788f3e806861af Thomas Gleixner 2020-08-21 238 struct irq_domain * __init
native_create_pci_msi_domain(void)
52f518a3a7c2f80 Jiang Liu 2015-04-13 239 {
f8f37ca78915b51 Thomas Gleixner 2017-06-20 240 struct fwnode_handle *fn;
c788f3e806861af Thomas Gleixner 2020-08-21 241 struct irq_domain *d;
f8f37ca78915b51 Thomas Gleixner 2017-06-20 242
52f518a3a7c2f80 Jiang Liu 2015-04-13 243 if (disable_apic)
c788f3e806861af Thomas Gleixner 2020-08-21 244 return NULL;
443809828cb5ee0 Jiang Liu 2014-10-27 245
f8f37ca78915b51 Thomas Gleixner 2017-06-20 246 fn =
irq_domain_alloc_named_fwnode("PCI-MSI");
f8f37ca78915b51 Thomas Gleixner 2017-06-20 @247 if (fn) {
c788f3e806861af Thomas Gleixner 2020-08-21 248 d = pci_msi_create_irq_domain(fn,
&pci_msi_domain_info,
c788f3e806861af Thomas Gleixner 2020-08-21 249 x86_vector_domain);
f8f37ca78915b51 Thomas Gleixner 2017-06-20 250 }
c788f3e806861af Thomas Gleixner 2020-08-21 251 if (!d) {
e3beca48a45b5e0 Thomas Gleixner 2020-07-09 252 irq_domain_free_fwnode(fn);
c788f3e806861af Thomas Gleixner 2020-08-21 253 pr_warn("Failed to initialize
PCI-MSI irqdomain.\n");
e3beca48a45b5e0 Thomas Gleixner 2020-07-09 254 } else {
c788f3e806861af Thomas Gleixner 2020-08-21 255 d->flags |=
IRQ_DOMAIN_MSI_NOMASK_QUIRK;
c788f3e806861af Thomas Gleixner 2020-08-21 256 }
c788f3e806861af Thomas Gleixner 2020-08-21 257 return d;
443809828cb5ee0 Jiang Liu 2014-10-27 258 }
c788f3e806861af Thomas Gleixner 2020-08-21 259
:::::: The code at line 247 was first introduced by commit
:::::: f8f37ca78915b51a73bf240409fcda30d811b76b x86/msi: Create named irq domains
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org