Skip to content

Commit 961343d

Browse files
smaeulMarc Zyngier
authored andcommitted
genirq: Refactor accessors to use irq_data_get_affinity_mask
A couple of functions directly reference the affinity mask. Route them through irq_data_get_affinity_mask so they will pick up any refactoring done there. Signed-off-by: Samuel Holland <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6103063 commit 961343d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/linux/irq.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -879,16 +879,16 @@ static inline int irq_data_get_node(struct irq_data *d)
879879
return irq_common_data_get_node(d->common);
880880
}
881881

882-
static inline struct cpumask *irq_get_affinity_mask(int irq)
882+
static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
883883
{
884-
struct irq_data *d = irq_get_irq_data(irq);
885-
886-
return d ? d->common->affinity : NULL;
884+
return d->common->affinity;
887885
}
888886

889-
static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
887+
static inline struct cpumask *irq_get_affinity_mask(int irq)
890888
{
891-
return d->common->affinity;
889+
struct irq_data *d = irq_get_irq_data(irq);
890+
891+
return d ? irq_data_get_affinity_mask(d) : NULL;
892892
}
893893

894894
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
@@ -910,7 +910,7 @@ static inline void irq_data_update_effective_affinity(struct irq_data *d,
910910
static inline
911911
struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d)
912912
{
913-
return d->common->affinity;
913+
return irq_data_get_affinity_mask(d);
914914
}
915915
#endif
916916

0 commit comments

Comments
 (0)