From: yangfeng <yangfeng.lucky@gmail.com>
To: tglx@kernel.org
Cc: radu@rendec.net, linux-kernel@vger.kernel.org,
yangfeng <yangfeng.lucky@gmail.com>
Subject: [PATCH v2] irq/debug: implement missing FIXME in print_irq_desc()
Date: Fri, 4 Sep 2026 21:51:17 +0900 [thread overview]
Message-ID: <20260904125205.15311-1-yangfeng.lucky@gmail.com> (raw)
The original code ___PD(f) left a FIXME, so fix it.
The maximum length of a macro is 19, so modify the printk() from 14 to 20.
Signed-off-by: Yang Feng <yangfeng.lucky@gmail.com>
v2:
- Implement missing FIXME in ___PD() with __irqd_to_state
- move the define of __irqd_to_state before "include debug.h" in internals.h
- Adjust printk() width from 14 to 20
- Use full legal name in Signed-off-by
- Rebase to latest master
---
kernel/irq/debug.h | 13 ++++++-------
kernel/irq/internals.h | 4 ++--
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h
index 8ccb326d2977..451439135bed 100644
--- a/kernel/irq/debug.h
+++ b/kernel/irq/debug.h
@@ -3,10 +3,9 @@
* Debugging printout:
*/
-#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 ___P(f) if (desc->status_use_accessors & f) printk("%20s set\n", #f)
+#define ___PS(f) if (desc->istate & f) printk("%20s set\n", #f)
+#define ___PD(f) if (__irqd_to_state(&(desc->irq_data)) & f) printk("%20s 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
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 0ce21dd45404..43fe07a25b66 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -77,6 +77,8 @@ enum {
IRQS_SYSFS = 0x00004000,
};
+#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
+
#include "debug.h"
#include "settings.h"
@@ -215,8 +217,6 @@ static inline class_irqdesc_lock_t class_irqdesc_lock_constructor(unsigned int i
#define scoped_irqdesc ((struct irq_desc *)(__guard_ptr(irqdesc_lock)(&scope)))
-#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
-
static inline unsigned int irqd_get(struct irq_data *d)
{
return __irqd_to_state(d);
--
2.43.0
reply other threads:[~2026-09-04 12:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260904125205.15311-1-yangfeng.lucky@gmail.com \
--to=yangfeng.lucky@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=radu@rendec.net \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®