All of lore.kernel.org
 help / color / mirror / Atom feed
* [jonhunter:tegra/next-fixes 11/11] kernel/irq/manage.c:850:33: error: implicit declaration of function 'irq_get_desc_buslock'
@ 2025-05-10 11:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-10 11:11 UTC (permalink / raw)
  To: Jon Hunter; +Cc: oe-kbuild-all

tree:   https://github.com/jonhunter/linux tegra/next-fixes
head:   b6ba16943c776b1cd2b3559317337eb24b70f742
commit: b6ba16943c776b1cd2b3559317337eb24b70f742 [11/11] Revert "genirq/manage: Rework irq_set_irq_wake()"
config: i386-buildonly-randconfig-002-20250510 (https://download.01.org/0day-ci/archive/20250510/202505101946.DNxhuust-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250510/202505101946.DNxhuust-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/202505101946.DNxhuust-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/irq/manage.c: In function 'irq_set_irq_wake':
>> kernel/irq/manage.c:850:33: error: implicit declaration of function 'irq_get_desc_buslock' [-Werror=implicit-function-declaration]
     850 |         struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
         |                                 ^~~~~~~~~~~~~~~~~~~~
   kernel/irq/manage.c:850:33: warning: initialization of 'struct irq_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> kernel/irq/manage.c:886:9: error: implicit declaration of function 'irq_put_desc_busunlock' [-Werror=implicit-function-declaration]
     886 |         irq_put_desc_busunlock(desc, flags);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/irq_get_desc_buslock +850 kernel/irq/manage.c

   828	
   829	/**
   830	 * irq_set_irq_wake - control irq power management wakeup
   831	 * @irq:	interrupt to control
   832	 * @on:	enable/disable power management wakeup
   833	 *
   834	 * Enable/disable power management wakeup mode, which is disabled by
   835	 * default.  Enables and disables must match, just as they match for
   836	 * non-wakeup mode support.
   837	 *
   838	 * Wakeup mode lets this IRQ wake the system from sleep states like
   839	 * "suspend to RAM".
   840	 *
   841	 * Note: irq enable/disable state is completely orthogonal to the
   842	 * enable/disable state of irq wake. An irq can be disabled with
   843	 * disable_irq() and still wake the system as long as the irq has wake
   844	 * enabled. If this does not hold, then the underlying irq chip and the
   845	 * related driver need to be investigated.
   846	 */
   847	int irq_set_irq_wake(unsigned int irq, unsigned int on)
   848	{
   849		unsigned long flags;
 > 850		struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
   851		int ret = 0;
   852	
   853		if (!desc)
   854			return -EINVAL;
   855	
   856		/* Don't use NMIs as wake up interrupts please */
   857		if (irq_is_nmi(desc)) {
   858			ret = -EINVAL;
   859			goto out_unlock;
   860		}
   861	
   862		/* wakeup-capable irqs can be shared between drivers that
   863		 * don't need to have the same sleep mode behaviors.
   864		 */
   865		if (on) {
   866			if (desc->wake_depth++ == 0) {
   867				ret = set_irq_wake_real(irq, on);
   868				if (ret)
   869					desc->wake_depth = 0;
   870				else
   871					irqd_set(&desc->irq_data, IRQD_WAKEUP_STATE);
   872			}
   873		} else {
   874			if (desc->wake_depth == 0) {
   875				WARN(1, "Unbalanced IRQ %d wake disable\n", irq);
   876			} else if (--desc->wake_depth == 0) {
   877				ret = set_irq_wake_real(irq, on);
   878				if (ret)
   879					desc->wake_depth = 1;
   880				else
   881					irqd_clear(&desc->irq_data, IRQD_WAKEUP_STATE);
   882			}
   883		}
   884	
   885	out_unlock:
 > 886		irq_put_desc_busunlock(desc, flags);
   887		return ret;
   888	}
   889	EXPORT_SYMBOL(irq_set_irq_wake);
   890	

-- 
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:[~2025-05-10 11:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-10 11:11 [jonhunter:tegra/next-fixes 11/11] kernel/irq/manage.c:850:33: error: implicit declaration of function 'irq_get_desc_buslock' kernel test robot

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.