Skip to contentSkip to conversation

irq/debug: implement missing FIXME in print_irq_desc()

PATCH Superseded yangfeng 2 participants 2 messages Sep 3 – Sep 4 IRQ

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

yangfeng

author
#0 lore raw

PATCH 1/1 irq/debug: implement missing FIXME in print_irq_desc()

The original code ___PD(f) left a FIXME, so fix it. The maximum length of a macro is 15, so modify the printk().

---
 kernel/irq/debug.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
kernel/irq/debug.h +4 -5
index 8ccb326d2977..aa233cbeea38 100644
@@ -5,8 +5,7 @@
 
 #define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
 #define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
-/* FIXME */
-#define ___PD(f) do { } while (0)
+#define ___PD(f) if (ACCESS_PRIVATE((&(desc->irq_data))->common, state_use_accessors) & f) printk("%14s set\n", #f)
 
 static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
@@ -39,9 +38,9 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
 	___PS(IRQS_WAITING);
 	___PS(IRQS_PENDING);
 
-	___PD(IRQS_INPROGRESS);
-	___PD(IRQS_DISABLED);
-	___PD(IRQS_MASKED);
+	___PD(IRQD_IRQ_INPROGRESS);
+	___PD(IRQD_IRQ_DISABLED);
+	___PD(IRQD_IRQ_MASKED);
 }
 
 #undef ___P
Signature · 1 line
2.43.0
maintainer
#1 lore raw

On Thu, Sep 03 2026 at 22:19, yangfeng wrote:

The proper prefix is: genirq/debug:

Quoted 1 line

The original code ___PD(f) left a FIXME, so fix it.

That's really informative.

Quoted 1 line

The maximum length of a macro is 15, so modify the printk().

And this is just incomprehensible

Quoted 1 line

You need to provide your full name not a nickname. See Documentation/process.

Quoted 9 lines
---
 kernel/irq/debug.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
kernel/irq/debug.h +0 -0
index 8ccb326d2977..aa233cbeea38 100644

kernel/irq/debug.h line 8

Quoted 6 lines
kernel/irq/debug.h +1 -2
@@ -5,8 +5,7 @@
 
 #define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
 #define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
-/* FIXME */
-#define ___PD(f) do { } while (0)
+#define ___PD(f) if (ACCESS_PRIVATE((&(desc->irq_data))->common, state_use_accessors) & f) printk("%14s set\n", #f)

__irqd_to_state() exists for a reason and it's available in internal.h. The define just needs to be before including debug.h.