Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7306708rwb; Tue, 6 Dec 2022 04:11:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf6h32crD5M18FYUF7F9PNlMcg4a6fbQ6Uu8aBTxNJnt7KBQalhnjvuOS/JOoEghBnZ8CMHE X-Received: by 2002:a17:906:a41a:b0:7c0:e80e:5af0 with SMTP id l26-20020a170906a41a00b007c0e80e5af0mr8959952ejz.235.1670328689328; Tue, 06 Dec 2022 04:11:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670328689; cv=none; d=google.com; s=arc-20160816; b=s7tGSPgd28EDIKkpvNaxVvB9bB6kEvL7hiIzvoMkK5qJ99foig4NyaSBDWdLZ225+i MekeivrftxJBT4xgNMZL/53uheDGQjI6aUSIOcyvRCburJa6yr656ZLFcjou/b/qiBnN LD0pUVXpOIbmZI58VlFcSKbG+bmxPl1j+3AnvrNXqGUta2f0eDMef9ggWw03UeqTFSpz E2VCySaRMsgDlfiUWCJdCXqWnleyu47P0UKSeREt+IQyBbtGEliCL6kSyGAUp8WVsuSp eh2976EzyqNjG8fRUOzn1oYmkx+R4gqpLc6Z8zl4MZv0l21DjZ0KefvKXNdnggdVO8O7 q1Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=EdsOvn9qH/3x0ajXkWx0p8XrIZu+IBeVVw5n8nacL2w=; b=yJqCYwxkCe2Dd+XwLAt+D50Jyc2f9VCqZjXN64rIjydIYgMTAetqkC2KrQmL/TK3ak YkqbjQhSUzKddC9iiIwm7hkXp4zr3RHqYB8ULPXdzqNWFqjXtCPoSJzGWt7dvKzGU1iT cw6emJmL4/Ec5KS9f0RPfgYhFtQoVJRtZVhefcBN+2GRu6+NGLCI7iLesZa9gAsTG0Y5 Sjhwj7iuNWHc2GdKB8DgC0jKNVFfAew5g5NmtZKV0ytcrwNBEfE9+qbF0clc7lLuKuhl vbCNcpgLNlndjM5N9ltXP9/sPy4yrfBx4n4O65Y+VVfqKJsS20jjJTTM7FxQeTh612Rq qucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LSBUdbr5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa20-20020a1709076d1400b007c0a88076d5si12542541ejc.818.2022.12.06.04.11.10; Tue, 06 Dec 2022 04:11:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LSBUdbr5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235173AbiLFL7d (ORCPT + 79 others); Tue, 6 Dec 2022 06:59:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234260AbiLFL6j (ORCPT ); Tue, 6 Dec 2022 06:58:39 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8054728704; Tue, 6 Dec 2022 03:57:58 -0800 (PST) Date: Tue, 06 Dec 2022 11:57:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670327876; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EdsOvn9qH/3x0ajXkWx0p8XrIZu+IBeVVw5n8nacL2w=; b=LSBUdbr5AHPND8urKFPwdtPUs7rp3LQO/HUzggTMWLhnQmytGOlME1B65LrRzEbNmuzbDy NzHyuLgbgLsP5seTIMi7ETLv9EDuBiLdW5SnetcWr7Ffi0dLZRXgCrtTsmS+h3H/4rr3sz CbsJd6Q70tmgw7xILsoiu3fmc4JYKfUvuN+Hx8tLjXaPEK77AX7+qWN5X+Xn+4CLcFNrbs 3oVAqtASWFnONY1uyEvP7jeHThjTcM5voqUkEC2kY9yt48hx1HQH0xG5WIIHTWo6CVC4wj AoUYmMK/bOKA13ZRkj9OxrAPPBrI8g6tE6AFT2MJYAxHcqg/jmU8LCil2UkrWg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670327876; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EdsOvn9qH/3x0ajXkWx0p8XrIZu+IBeVVw5n8nacL2w=; b=hFTFH6HxDinHw6kiPf8tdZBpSCTap5OUfe9xDFo1Xj6Tk7jynGh83stpfvpKSFW729VYbW 3pKSOZcwyjg5guCA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/irq-mvebu-icu: Fix works by chance pointer assignment Cc: Thomas Gleixner , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221121140048.344525618@linutronix.de> References: <20221121140048.344525618@linutronix.de> MIME-Version: 1.0 Message-ID: <167032787659.4906.13112643126419077191.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 55721afa8d8b82e442cb4eaf7173330f79cbfb48 Gitweb: https://git.kernel.org/tip/55721afa8d8b82e442cb4eaf7173330f79cbfb48 Author: Thomas Gleixner AuthorDate: Mon, 21 Nov 2022 15:39:29 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 06 Dec 2022 12:50:17 +01:00 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 Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221121140048.344525618@linutronix.de --- drivers/irqchip/irq-mvebu-icu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c index 497da34..3c77acc 100644 --- a/drivers/irqchip/irq-mvebu-icu.c +++ b/drivers/irqchip/irq-mvebu-icu.c @@ -151,9 +151,9 @@ static int mvebu_icu_irq_domain_translate(struct irq_domain *d, struct irq_fwspec *fwspec, unsigned long *hwirq, unsigned int *type) { - struct mvebu_icu_msi_data *msi_data = platform_msi_get_host_data(d); - struct mvebu_icu *icu = platform_msi_get_host_data(d); unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2; + struct mvebu_icu_msi_data *msi_data = platform_msi_get_host_data(d); + struct mvebu_icu *icu = msi_data->icu; /* Check the count of the parameters in dt */ if (WARN_ON(fwspec->param_count != param_count)) {