From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4149C433EF for ; Wed, 20 Oct 2021 08:24:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A1F161212 for ; Wed, 20 Oct 2021 08:24:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229842AbhJTI1J (ORCPT ); Wed, 20 Oct 2021 04:27:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:39554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbhJTI1H (ORCPT ); Wed, 20 Oct 2021 04:27:07 -0400 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 A0A3D611C6; Wed, 20 Oct 2021 08:24:53 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1md6u3-000Nya-9Z; Wed, 20 Oct 2021 09:24:51 +0100 Date: Wed, 20 Oct 2021 09:24:50 +0100 Message-ID: <87tuhcnlwt.wl-maz@kernel.org> From: Marc Zyngier To: Rob Herring Cc: Florian Fainelli , "linux-kernel@vger.kernel.org" , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Frank Rowand , "moderated list:ARM SUB-ARCHITECTURES" , "open list:MIPS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" Subject: Re: [PATCH v4 09/14] irqchip: Provide platform_device to of_irq_init_cb_t In-Reply-To: References: <20211009022023.3796472-1-f.fainelli@gmail.com> <20211009022023.3796472-10-f.fainelli@gmail.com> <871r4gvggb.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: robh@kernel.org, f.fainelli@gmail.com, linux-kernel@vger.kernel.org, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, tsbogend@alpha.franken.de, tglx@linutronix.de, frowand.list@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, devicetree@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 Oct 2021 23:23:52 +0100, Rob Herring wrote: > > On Tue, Oct 19, 2021 at 4:43 PM Marc Zyngier wrote: > > > > diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h > > index ccf32758ea85..146a9d80a6a2 100644 > > --- a/include/linux/irqchip.h > > +++ b/include/linux/irqchip.h > > @@ -33,7 +33,15 @@ 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 }, > > +/* Undefined on purpose */ > > +int typecheck_irq_init_cb(struct device_node *, struct device_node *, > > + struct platform_device *); > > + > > +#define typecheck_irq_init_cb(fn) \ > > + __typecheck(typecheck_irq_init_cb, fn) ? fn : fn > > That's nice! Shouldn't it also be used for IRQCHIP_DECLARE? Absolutely. And enabling this shows that changing of_irq_init_cb_t breaks *all users* of IRQCHIP_DECLARE(). Not an acceptable outcome when we're at -rc5. Why can't the relevant drivers use of_find_device_by_node() instead? That would allow us to keep the status-quo on of_irq_init_cb_t. Thanks, M. -- Without deviation from the norm, progress is not possible.