public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] irq: print depth in __enable_irq WARNING
@ 2022-03-25  1:33 Chen Lifu
  2022-04-10 19:40 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Lifu @ 2022-03-25  1:33 UTC (permalink / raw)
  To: tglx, linux-kernel

Since case 0 and 1 of desc->depth may print same warning messages as follows,
according to the messages, we do not know in which case the warning is generated.
This patch prints extra desc->depth in the warning messages to distinguish
these cases.
This patch just does warning message changes,no functional changes.

[20220314100142]------------[ cut here ]------------
[20220314100142]WARNING: CPU: 1 PID: 10332 at kernel/irq/manage.c:723 __enable_irq+0x58/0xa4
[20220314100142]Unbalanced enable for IRQ 38
......

Signed-off-by: Chen Lifu <chenlifu@huawei.com>
---
 kernel/irq/manage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index c03f71d5ec10..83bb9d9ee71a 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -769,12 +769,12 @@ void disable_nmi_nosync(unsigned int irq)
 void __enable_irq(struct irq_desc *desc)
 {
 	switch (desc->depth) {
 	case 0:
  err_out:
-		WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n",
-		     irq_desc_get_irq(desc));
+		WARN(1, KERN_WARNING "depth %u: Unbalanced enable for IRQ %d\n",
+		     desc->depth, irq_desc_get_irq(desc));
 		break;
 	case 1: {
 		if (desc->istate & IRQS_SUSPENDED)
 			goto err_out;
 		/* Prevent probing on this irq: */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-10 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-25  1:33 [PATCH -next] irq: print depth in __enable_irq WARNING Chen Lifu
2022-04-10 19:40 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox