Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1353383imm; Tue, 22 May 2018 02:41:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqyP3xhIt/WSb5ZEAgXgaRgBdXlkw57PT6XOXojcvzqCVEU1R5fAY96QpdENvKwKSNyWwt+ X-Received: by 2002:a17:902:a716:: with SMTP id w22-v6mr23275793plq.215.1526982115980; Tue, 22 May 2018 02:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526982115; cv=none; d=google.com; s=arc-20160816; b=t9WQ8mg6MlFNDkwE3zSnQjp1yzVebnmvveCvDMiD0Gp0pNYvPkq/JvfXQDby0o7pSK Xd7W46VB16ZuNbPlE/EPQxtgeJ3y3izS2WgtlYUJXYL11mhQAGaxHPATHx0oFxtA/6kq unSvJDF7IdC8EZC9DJJY4MaB3YOEcURNTg8IuqMuajDaruEcWreRJCI/OLE0zJwttmdG yVWYBDEFyqAdQy7RjjgyZjRJqrnH7ccGC6UNJvYznFZslOEJDH+3DViGs2W5wy42lyXD pzvUwuzvrHZuxZSDuJhEFtp3b/3se/eT4rO+EN9wyWZEEOUHm+R2tK8YECLJS4a9JTrQ lIag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=iFyBqVPeX/dpt1rw0vJRowKPbr1yoYocp/pdNTVjkYw=; b=uYYXOoUBeZS7XckroMnRU/cIEDOadXEqV6O/kQHrT2iKwwGGvkfFgiLOawkb94DJHp IcC7TRL133gG+N6CGVhlO2u7aboZn8spEoNpdH85NAO8DMCBj+wnLSHFQC3UpfX/ugVS 8xzQknREdjjNOfto35Eki/JazWCP8dMclgspFLxL1SCAPlg05bdFzPB02UpLXdR7E4Gu CZc1rZ1kzI1+U18xZI1x5t5v0MomCRGU7S+j5POKfdHvh2XeslrjoNq2bynO2jzSy/Us Tsr13jyqkYw3hmzBOc9sk18ZhgXqwgyvbvsf71fMn3SRXu+nRAyXWBWXJzncP+7cRNOy mx7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5-v6si16423524pfm.119.2018.05.22.02.41.41; Tue, 22 May 2018 02:41:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751538AbeEVJlG (ORCPT + 99 others); Tue, 22 May 2018 05:41:06 -0400 Received: from mail.bootlin.com ([62.4.15.54]:49680 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbeEVJk4 (ORCPT ); Tue, 22 May 2018 05:40:56 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id AAE7320728; Tue, 22 May 2018 11:40:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 3A44D20734; Tue, 22 May 2018 11:40:44 +0200 (CEST) From: Miquel Raynal To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Catalin Marinas , Will Deacon , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Cc: Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Antoine Tenart , Maxime Chevallier , Nadav Haklai , Haim Boot , Hanna Hawa , linux-kernel@vger.kernel.org, Miquel Raynal Subject: [PATCH v2 03/16] irqchip/irq-mvebu-icu: fix wrong private data retrieval Date: Tue, 22 May 2018 11:40:29 +0200 Message-Id: <20180522094042.24770-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180522094042.24770-1-miquel.raynal@bootlin.com> References: <20180522094042.24770-1-miquel.raynal@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The irq_domain structure has an host_data pointer that just stores private data. It is meant to not be touched by the IRQ core. However, when it comes to MSI, the MSI layer adds its own private data there with a structure that also has a host_data pointer. Because this IRQ domain is an MSI domain, to access private data we should do a d->host_data->host_data, also wrapped as 'platform_msi_get_host_data()'. This bug was lying there silently because the 'icu' structure retrieved this way was just called by dev_err(), only producing a '(NULL device *):' output on the console. Signed-off-by: Miquel Raynal Reviewed-by: Thomas Petazzoni --- drivers/irqchip/irq-mvebu-icu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c index 13063339b416..a2a3acd74491 100644 --- a/drivers/irqchip/irq-mvebu-icu.c +++ b/drivers/irqchip/irq-mvebu-icu.c @@ -105,7 +105,7 @@ static int mvebu_icu_irq_domain_translate(struct irq_domain *d, struct irq_fwspec *fwspec, unsigned long *hwirq, unsigned int *type) { - struct mvebu_icu *icu = d->host_data; + struct mvebu_icu *icu = platform_msi_get_host_data(d); unsigned int icu_group; /* Check the count of the parameters in dt */ -- 2.14.1