Skip to content

Commit 5c2b2cc

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
genirq: Merge irqaction::{dev_id,percpu_dev_id}
When irqaction::percpu_dev_id was introduced, it was hoped that it could be part of an anonymous union with dev_id, as the two fields are mutually exclusive. However, toolchains used at the time were often showing terrible support for anonymous unions, breaking the build on a number of architectures. It was therefore decided to keep the two fields separate and address this down the line. 14 years later, the compiler dark age is over, and there is universal support for anonymous unions. Get a whole pointer back that can immediately be spent on something else. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Will Deacon <will@kernel.org> Link: https://patch.msgid.link/20251020122944.3074811-13-maz@kernel.org
1 parent 5ff78c8 commit 5c2b2cc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

include/linux/interrupt.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
121121
*/
122122
struct irqaction {
123123
irq_handler_t handler;
124-
void *dev_id;
125-
void __percpu *percpu_dev_id;
124+
union {
125+
void *dev_id;
126+
void __percpu *percpu_dev_id;
127+
};
126128
struct irqaction *next;
127129
irq_handler_t thread_fn;
128130
struct task_struct *thread;

0 commit comments

Comments
 (0)