From patchwork Sat Sep 12 12:51:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 11771871 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CE36112E for ; Sat, 12 Sep 2020 12:52:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D1211208E4 for ; Sat, 12 Sep 2020 12:52:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="e4A4SQR1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="R6Hl4lp/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1211208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fr/WI/Nia89N0KQrVOEAYXEEHmeLZN7FXP96oafUwWo=; b=e4A4SQR1m7mJ536Lf/EiQJv/r Budoz1VnF05G6z5EEfrIfqzCpn7PP0U2+OSdsUfeVEAIOuchT6HkVNQcmXhzU41sNSvWfKWHy37nV +Mjxgl+SLplDpK9keP5IG8DjFusUvGXbFUCXYygYYyTYsNurzYbnAYmFOmaot7tLjMzsDIEdMDPex eXIVa+Gckm5FduV8t3z68nOpSyw1KaxL09t2zcDNJiOwfqiCYnVdCNISF/p5A82ckqJ/2d1aTX4mL zz00HtOQxWNb4xFnGmOsPUkbT43kVuvYeYFwbbqwr/QMP7SIH21Try1hxmJCxij6OTRSAEgTKTdFZ dglWBqfaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kH50m-0004oR-TB; Sat, 12 Sep 2020 12:52:12 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kH50i-0004mO-Vh for linux-arm-kernel@lists.infradead.org; Sat, 12 Sep 2020 12:52:10 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 41E74208E4; Sat, 12 Sep 2020 12:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599915127; bh=j+V8uWlUtBGKarWfp0I9mmthwCt2ao2kD0ZxDnNDsvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R6Hl4lp/5mOmiCJXgaeJg0eumwQOGB4Rwe86ye49rsvBIgtXv76eHrXZ+zF1/L2SL w0Z090LBWKufpRqerefXzdSJmtHHVF8hsRUYa3rWKxbZ2END92h5ovrWqUQKqcQaDX DrgFa94DOPC84/os/np4qKt73p4eVlNxeCeCSCUY= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kH50f-00BEw6-Or; Sat, 12 Sep 2020 13:52:05 +0100 From: Marc Zyngier To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/6] irqchip: Make IRQCHIP_MATCH() type safe Date: Sat, 12 Sep 2020 13:51:44 +0100 Message-Id: <20200912125148.1271481-3-maz@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200912125148.1271481-1-maz@kernel.org> References: <20200912125148.1271481-1-maz@kernel.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, enric.balletbo@collabora.com, linux@fw-web.de, john.stultz@linaro.org, saravanak@google.com, hanks.chen@mediatek.com, agross@kernel.org, bjorn.andersson@linaro.org, matthias.bgg@gmail.com, tglx@linutronix.de, jason@lakedaemon.net, robh+dt@kernel.org, frowand.list@gmail.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200912_085209_115509_94EEE179 X-CRM114-Status: GOOD ( 15.67 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Cooper , Saravana Kannan , kernel-team@android.com, Hanks Chen , Rob Herring , Bjorn Andersson , Matthias Brugger , Andy Gross , John Stultz , Enric Balletbo i Serra , Frank Wunderlich , Frank Rowand , Thomas Gleixner Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org IRQCHIP_DECLARE() is backed by macros that perform some elementary type checking on the probe function. Unfortunately, IRQCHIP_MATCH() doesn't, risking difficult debugging sessions... Rewrite IRQCHIP_MATCH() in terms of _OF_DECLARE_ELMT() restore the missing type safety. Signed-off-by: Marc Zyngier Reviewed-by: Bjorn Andersson --- include/linux/irqchip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 67351aac65ef..f8f25e9f8200 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -33,7 +33,7 @@ extern int platform_irqchip_probe(struct platform_device *pdev); #define IRQCHIP_PLATFORM_DRIVER_BEGIN(drv_name) \ static const struct of_device_id drv_name##_irqchip_match_table[] = { -#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, .data = fn }, +#define IRQCHIP_MATCH(compat, fn) _OF_DECLARE_ELMT(compat, fn, of_init_fn_2) #define IRQCHIP_PLATFORM_DRIVER_END(drv_name) \ {}, \