[tip:irq/urgent 1/1] kernel/irq/irqdesc.c:446:6: error: 'irq_kobj_base' undeclared; did you mean 'irq_kobj_type'?

From: kbuild test robot
Date: Mon Aug 19 2019 - 15:18:26 EST


tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/tip/tip.git irq/urgent
head: e1ee29624746fbf667f80e8ae3815a76e4d1bd5b
commit: e1ee29624746fbf667f80e8ae3815a76e4d1bd5b [1/1] genirq: Properly pair kobject_del() with kobject_add()
config: powerpc-allnoconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout e1ee29624746fbf667f80e8ae3815a76e4d1bd5b
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=powerpc

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

kernel/irq/irqdesc.c: In function 'free_desc':
>> kernel/irq/irqdesc.c:446:6: error: 'irq_kobj_base' undeclared (first use in this function); did you mean 'irq_kobj_type'?
if (irq_kobj_base)
^~~~~~~~~~~~~
irq_kobj_type
kernel/irq/irqdesc.c:446:6: note: each undeclared identifier is reported only once for each function it appears in

vim +446 kernel/irq/irqdesc.c

424
425 static void free_desc(unsigned int irq)
426 {
427 struct irq_desc *desc = irq_to_desc(irq);
428
429 irq_remove_debugfs_entry(desc);
430 unregister_irq_proc(irq, desc);
431
432 /*
433 * sparse_irq_lock protects also show_interrupts() and
434 * kstat_irq_usr(). Once we deleted the descriptor from the
435 * sparse tree we can free it. Access in proc will fail to
436 * lookup the descriptor.
437 *
438 * The sysfs entry must be serialized against a concurrent
439 * irq_sysfs_init() as well.
440 *
441 * If irq_sysfs_init() has not yet been invoked (early boot), then
442 * irq_kobj_base is NULL and the descriptor was never added.
443 * kobject_del() complains about a object with no parent, so make
444 * it conditional.
445 */
> 446 if (irq_kobj_base)
447 kobject_del(&desc->kobj);
448 delete_irq_desc(irq);
449
450 /*
451 * We free the descriptor, masks and stat fields via RCU. That
452 * allows demultiplex interrupts to do rcu based management of
453 * the child interrupts.
454 * This also allows us to use rcu in kstat_irqs_usr().
455 */
456 call_rcu(&desc->rcu, delayed_free_desc);
457 }
458

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip