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 7DF72C4332F for ; Wed, 20 Oct 2021 15:14:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6373761359 for ; Wed, 20 Oct 2021 15:14:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230396AbhJTPQe (ORCPT ); Wed, 20 Oct 2021 11:16:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230029AbhJTPQd (ORCPT ); Wed, 20 Oct 2021 11:16:33 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 554B1C06161C; Wed, 20 Oct 2021 08:14:19 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id 187so3223723pfc.10; Wed, 20 Oct 2021 08:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=TDLzKkefiW2qBcvhl9Mh1B9EpLxuIPGwsH2zNljPvVs=; b=DOen5TCfJtA35vSF3dAtiaJkpldhQRHm/jmvb9QBl5DBXxRYX+iQ6/fBeR3GVBMoya elnoAqS4D2bVR0BFIpEW+l2RvR/fbtMUaAyEr4vyFLpZnYVfw2OaDzLKqOp4Xfcu+Y5O 2zjSL4Nz9JUW/GnqjGbiHFXgClpiaGXjulr+jw8wiLrU79DBipcQFXiIXn2szNFZZ94o TOEhEOFCBmHjbj/x6Q9g/nIq3Et8Hj1zQagSK+pYlxxOOeQfd2dC8KyIZvjaUAmZfTyP mLgoO7IL71dOPbSlkuPj7mFEgl5jZVmwQprG49+aX1NTDdvtoVS6RLaxqr89LxJ04xXR mTbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=TDLzKkefiW2qBcvhl9Mh1B9EpLxuIPGwsH2zNljPvVs=; b=A6inxs7luaqi7KqXYzBfZMQFsZ4I1hELFFOcpSuOPj+nX4+PDl0IAVsjcQwBDjLY5J WKwt9bXfdLKFRHKQUw25i1+sDlqgRMXZuonBYAwSDx+Y6LUDzNZC8QtynY/dBuYiK00h XzbmRgGm0P1fk5OhHKcYfa/Zal7sZ6Qrr7DghlUbD9J90yJ628dvGmVHJdwAZ5qlPNAb aHzWgz8Fdrr+xwecX901gNV4aVh/g3uYOHv+PslR3d7JeWSNZ8DopsI3V03D1zAmTjiI +JXEWm7rJsylNqJFws9yVygDO3IFwLyMSuUCftVvo8fc2NKhjsmvmC4/SVz5RYIJngBB 0WjA== X-Gm-Message-State: AOAM530nIgpjW6oqey3cIk33jsNToPO2F9G5HkWWFGwSupHlemQ3T81x X48cHBz4yKlBqZqdupAo+Os= X-Google-Smtp-Source: ABdhPJzxgXnhqhph34eLaK9uCGeTajw1218Blaf9Oo5OFWjJ/dESKTgwUNGYgmRsel5mrhk1ihQmWA== X-Received: by 2002:a05:6a00:2181:b0:44d:c18d:7af9 with SMTP id h1-20020a056a00218100b0044dc18d7af9mr25513pfi.16.1634742858719; Wed, 20 Oct 2021 08:14:18 -0700 (PDT) Received: from [192.168.1.121] (99-44-17-11.lightspeed.irvnca.sbcglobal.net. [99.44.17.11]) by smtp.gmail.com with ESMTPSA id x6sm3301886pfh.77.2021.10.20.08.14.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Oct 2021 08:14:18 -0700 (PDT) Message-ID: Date: Wed, 20 Oct 2021 08:14:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v4 09/14] irqchip: Provide platform_device to of_irq_init_cb_t Content-Language: en-US To: Marc Zyngier , 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" References: <20211009022023.3796472-1-f.fainelli@gmail.com> <20211009022023.3796472-10-f.fainelli@gmail.com> <871r4gvggb.wl-maz@kernel.org> <87tuhcnlwt.wl-maz@kernel.org> From: Florian Fainelli In-Reply-To: <87tuhcnlwt.wl-maz@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/20/2021 1:24 AM, Marc Zyngier wrote: > 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. Rob had suggested several solutions, including using of_find_device_by_node(), however updating of_irq_init_cb_t was indicated to be the better way. I had intentionally not updated IRQCHIP_DECLARE() because it would ignore the 3rd argument we passed to it (platform_device *) so I thought. If I am spinning a v6 using of_find_device_by_node() would that be acceptable to you? -- Florian 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 B73F1C433F5 for ; Wed, 20 Oct 2021 15:31:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8679B61373 for ; Wed, 20 Oct 2021 15:31:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8679B61373 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JUdf/UeswIgawN62cekknz3P7z/aa+/zlO1rpQ7ciyk=; b=zL3SHVCi/2Qmw1 ZbGb/P4pxR31JkRsOb4MSFaY6+gimfUHyH9IY4MIYIBLziBAFjym7eXqVy32k0lQIDxkDhv3tDs1a qB58p1nEzdOcjVcbYLKDejWNdurGRtHXq6Jw3hFaMaot5G/Vd5eeugO0UqPPE9Qwe1NhTJEdPlj3O TWFR50QLvHCcBzM3A/9Hu6uZE1ww6Adi0f/qOR8PkwxayxKfSwylePfoEUGKdk/fXwZUsqEhwRRZr NpIATWBjKQkLUyWi8keVKM2AqYs5TPk5y6rafnu8cdmCxt9T7PkydAU9I8lFKUd2cghxGKRhyDFks oK5FD+JvPCjz1teGyJaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdDWm-0051sD-T8; Wed, 20 Oct 2021 15:29:17 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdDIK-004wQk-2G for linux-arm-kernel@lists.infradead.org; Wed, 20 Oct 2021 15:14:21 +0000 Received: by mail-pf1-x42b.google.com with SMTP id t184so3270583pfd.0 for ; Wed, 20 Oct 2021 08:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=TDLzKkefiW2qBcvhl9Mh1B9EpLxuIPGwsH2zNljPvVs=; b=DOen5TCfJtA35vSF3dAtiaJkpldhQRHm/jmvb9QBl5DBXxRYX+iQ6/fBeR3GVBMoya elnoAqS4D2bVR0BFIpEW+l2RvR/fbtMUaAyEr4vyFLpZnYVfw2OaDzLKqOp4Xfcu+Y5O 2zjSL4Nz9JUW/GnqjGbiHFXgClpiaGXjulr+jw8wiLrU79DBipcQFXiIXn2szNFZZ94o TOEhEOFCBmHjbj/x6Q9g/nIq3Et8Hj1zQagSK+pYlxxOOeQfd2dC8KyIZvjaUAmZfTyP mLgoO7IL71dOPbSlkuPj7mFEgl5jZVmwQprG49+aX1NTDdvtoVS6RLaxqr89LxJ04xXR mTbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=TDLzKkefiW2qBcvhl9Mh1B9EpLxuIPGwsH2zNljPvVs=; b=o2RSv7kIZmSY2zKz1fhgfGcKV7ueEppKKyxQ7ifQXMhl0WF+HggQVOgT9k07FzeQnF +f2ntWoNd6/MFEGYLpuOrCr3U/ZeH3n0GO0jU2RjZnrN4Ux2CxeTlY589c7As3mHnDZh SPewJDqsHdYOhkz9Yfkh55VZ5GMGnhGmMx++KkKw9YRKm+KG0y+G8So5g3+iljK7Cw5O ZnTAKqUhyo8GXffSR/72tvLqaxP39oXBy7Y8aRNjwy0S1jjxAMMOST5jZod6sK/PqkyM nrEyjvFNsCj8KwSziQLiA0sQ1qdxnU7km44vwinD9y08j5gUcwYD2EAf/H7HN08BMe59 9aLw== X-Gm-Message-State: AOAM530O+w+7jdbVYP6VHGesBU3HbMPJMGjv8/ASPfv4QulrDUmwzoOk RjhzHT4Q1Bnob5OojX8hKRk= X-Google-Smtp-Source: ABdhPJzxgXnhqhph34eLaK9uCGeTajw1218Blaf9Oo5OFWjJ/dESKTgwUNGYgmRsel5mrhk1ihQmWA== X-Received: by 2002:a05:6a00:2181:b0:44d:c18d:7af9 with SMTP id h1-20020a056a00218100b0044dc18d7af9mr25513pfi.16.1634742858719; Wed, 20 Oct 2021 08:14:18 -0700 (PDT) Received: from [192.168.1.121] (99-44-17-11.lightspeed.irvnca.sbcglobal.net. [99.44.17.11]) by smtp.gmail.com with ESMTPSA id x6sm3301886pfh.77.2021.10.20.08.14.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Oct 2021 08:14:18 -0700 (PDT) Message-ID: Date: Wed, 20 Oct 2021 08:14:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v4 09/14] irqchip: Provide platform_device to of_irq_init_cb_t Content-Language: en-US To: Marc Zyngier , 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" References: <20211009022023.3796472-1-f.fainelli@gmail.com> <20211009022023.3796472-10-f.fainelli@gmail.com> <871r4gvggb.wl-maz@kernel.org> <87tuhcnlwt.wl-maz@kernel.org> From: Florian Fainelli In-Reply-To: <87tuhcnlwt.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211020_081420_184388_2B34F001 X-CRM114-Status: GOOD ( 15.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/20/2021 1:24 AM, Marc Zyngier wrote: > 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. Rob had suggested several solutions, including using of_find_device_by_node(), however updating of_irq_init_cb_t was indicated to be the better way. I had intentionally not updated IRQCHIP_DECLARE() because it would ignore the 3rd argument we passed to it (platform_device *) so I thought. If I am spinning a v6 using of_find_device_by_node() would that be acceptable to you? -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel