Skip to content

Commit 55721af

Browse files
committed
irqchip/irq-mvebu-icu: Fix works by chance pointer assignment
Assigning a void pointer which points to a struct to two different data types only works by chance if the second type is the first member of the struct. Replace this works by chance code by using the primary struct pointer. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20221121140048.344525618@linutronix.de
1 parent fa5745a commit 55721af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/irqchip/irq-mvebu-icu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ static int
151151
mvebu_icu_irq_domain_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
152152
unsigned long *hwirq, unsigned int *type)
153153
{
154-
struct mvebu_icu_msi_data *msi_data = platform_msi_get_host_data(d);
155-
struct mvebu_icu *icu = platform_msi_get_host_data(d);
156154
unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2;
155+
struct mvebu_icu_msi_data *msi_data = platform_msi_get_host_data(d);
156+
struct mvebu_icu *icu = msi_data->icu;
157157

158158
/* Check the count of the parameters in dt */
159159
if (WARN_ON(fwspec->param_count != param_count)) {

0 commit comments

Comments
 (0)