From patchwork Tue Dec 6 11:57:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 30263 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2776171wrr; Tue, 6 Dec 2022 04:01:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf4TH5R4IbSbWnOMR0VYKYSabTkqAoQJ4dlH/8Prc0LlWu+BcbutKYTgSp9JI+brBQaIw91z X-Received: by 2002:a05:6402:3783:b0:46b:cfa4:220 with SMTP id et3-20020a056402378300b0046bcfa40220mr22169373edb.179.1670328102750; Tue, 06 Dec 2022 04:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670328102; cv=none; d=google.com; s=arc-20160816; b=wUPSDVyxDmoJS7NS4TE3eJ0SRi1VbFYe6jZN/l3wICEOfywO7jDMjDB9hrFapt5CQE S/JswfsQpmCAAyr+aIYy7i9k0ZTLjlEju7T8qs/6Nt78y21SL137xb4rlkdbaobeFYTs XYw5ITPT7BzzBfvcULWMVLUBYPFskIoJBV23u2uhqa/VfKe7VmLZWI9icmGluiMIOmNw 8ySYtZsCXusrcAO3KMxb2J6Ts0t1F9BsuNzN04Q2itMUQYjmg1JBrjRCiFZK3r866z0f 30/LsG58pc18MZyHg1dsROwvJm6qb/3AUTHREufHytnmpHgGs/ZXPQGu2asojmW7+Djr J68g== 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; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a05640234ca00b0046b7410c015si2270757edc.18.2022.12.06.04.01.17; Tue, 06 Dec 2022 04:01:42 -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; 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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750118156423884107?= X-GMAIL-MSGID: =?utf-8?q?1751465960446584750?= 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)) {