Skip to content

Commit 9f3045e

Browse files
author
Paul Gortmaker
committed
irq: hide debug macros so they don't collide with others.
The file kernel/irq/debug.h temporarily defines P, PS, PD and then undefines them. However these names aren't really "internal" enough, and collide with other more legit users such as the ones in the xtensa arch, causing: In file included from kernel/irq/internals.h:58:0, from kernel/irq/irqdesc.c:18: kernel/irq/debug.h:8:0: warning: "PS" redefined [enabled by default] arch/xtensa/include/asm/regs.h:59:0: note: this is the location of the previous definition Add a handful of underscores to do a better job of hiding these temporary macros. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
1 parent bfae8ee commit 9f3045e

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

‎kernel/irq/debug.h‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
#include <linux/kallsyms.h>
66

7-
#define P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
8-
#define PS(f) if (desc->istate & f) printk("%14s set\n", #f)
7+
#define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f)
8+
#define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f)
99
/* FIXME */
10-
#define PD(f) do { } while (0)
10+
#define ___PD(f) do { } while (0)
1111

1212
static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
1313
{
@@ -23,23 +23,23 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
2323
print_symbol("%s\n", (unsigned long)desc->action->handler);
2424
}
2525

26-
P(IRQ_LEVEL);
27-
P(IRQ_PER_CPU);
28-
P(IRQ_NOPROBE);
29-
P(IRQ_NOREQUEST);
30-
P(IRQ_NOTHREAD);
31-
P(IRQ_NOAUTOEN);
26+
___P(IRQ_LEVEL);
27+
___P(IRQ_PER_CPU);
28+
___P(IRQ_NOPROBE);
29+
___P(IRQ_NOREQUEST);
30+
___P(IRQ_NOTHREAD);
31+
___P(IRQ_NOAUTOEN);
3232

33-
PS(IRQS_AUTODETECT);
34-
PS(IRQS_REPLAY);
35-
PS(IRQS_WAITING);
36-
PS(IRQS_PENDING);
33+
___PS(IRQS_AUTODETECT);
34+
___PS(IRQS_REPLAY);
35+
___PS(IRQS_WAITING);
36+
___PS(IRQS_PENDING);
3737

38-
PD(IRQS_INPROGRESS);
39-
PD(IRQS_DISABLED);
40-
PD(IRQS_MASKED);
38+
___PD(IRQS_INPROGRESS);
39+
___PD(IRQS_DISABLED);
40+
___PD(IRQS_MASKED);
4141
}
4242

43-
#undef P
44-
#undef PS
45-
#undef PD
43+
#undef ___P
44+
#undef ___PS
45+
#undef ___PD

0 commit comments

Comments
 (0)