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 586A4C433EF for ; Mon, 27 Sep 2021 19:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36F7A61041 for ; Mon, 27 Sep 2021 19:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236585AbhI0Tpj (ORCPT ); Mon, 27 Sep 2021 15:45:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:48744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236610AbhI0Tpi (ORCPT ); Mon, 27 Sep 2021 15:45:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D36661041; Mon, 27 Sep 2021 19:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632771840; bh=8GrvKu/IUbzbbcM+kL2hJO4c/ubmgYOvUvLZLycF9Vk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FCmXzIZyGDB0q81LQrHgBYVc22gJNKM4XS2kS49NDNIjzpQox4jTqNwDUUoUgqISc tAEeY3XkNfhf2j4NldvO4CBl5YyI2dqSc2qS1LnjiFYzNn7mQrJ34jPre0xGOMTLfK ShgtDMYy6WlfhbNpnly/x9Nn2+ums+zAhkZaPKioT9U7byyFEENU0HIMIE/xej+hPJ 6rDOq9+39HVadw2KsYSDBbbYJA6H64cPz3YQlYVG2JFPaNCIJi2JLubUlxxQhWBvsX V9In+EXzzWZobxD1bB5nrlOlr5NtODACdm6y/B7qIKoBuhDT2SchJR8r9/wK2OBM3P YdUqbY2txNJ+g== Received: by mail-ed1-f45.google.com with SMTP id ee50so73824957edb.13; Mon, 27 Sep 2021 12:43:59 -0700 (PDT) X-Gm-Message-State: AOAM532UskswrjJxcs6O0GTWFodRRjPgqogXJu35Bl/c0XYmcvM7+5yt PyJEiBri+m71yqtCYTWkvvXsHDAl958VpdzDVQ== X-Google-Smtp-Source: ABdhPJw0CYw78V/Ve0LRrStC/Z1ltF3mBSTTa+t2nz9TbflXF/Q5qk+QdRrlblPLEiSKsEprKHUdoxnZXde7l3xfk+s= X-Received: by 2002:a17:906:a294:: with SMTP id i20mr2146924ejz.128.1632771838384; Mon, 27 Sep 2021 12:43:58 -0700 (PDT) MIME-Version: 1.0 References: <20210924170546.805663-1-f.fainelli@gmail.com> <20210924170546.805663-8-f.fainelli@gmail.com> In-Reply-To: From: Rob Herring Date: Mon, 27 Sep 2021 14:43:47 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 07/11] of/irq: Export of_irq_count to drivers To: Florian Fainelli Cc: "linux-kernel@vger.kernel.org" , Russell King , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , Catalin Marinas , Will Deacon , Yoshinori Sato , Rich Felker , Thomas Gleixner , Marc Zyngier , Frank Rowand , Ard Biesheuvel , Mike Rapoport , Linus Walleij , Andrew Morton , Geert Uytterhoeven , Arnd Bergmann , Guenter Roeck , Kefeng Wang , Mark Rutland , Andrey Konovalov , Anshuman Khandual , Valentin Schneider , Ingo Molnar , Peter Zijlstra , "moderated list:ARM PORT" , "open list:SUPERH" , "open list:BROADCOM BMIPS MIPS ARCHITECTURE" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Mon, Sep 27, 2021 at 2:28 PM Florian Fainelli wrote: > > On 9/27/21 12:08 PM, Rob Herring wrote: > > On Fri, Sep 24, 2021 at 12:07 PM Florian Fainelli wrote: > >> > >> In order to build drivers/irqchip/irq-bcm7120-l2.c as a module, we will > >> need to have of_irq_count() exported to modules. > >> > >> Signed-off-by: Florian Fainelli > >> --- > >> drivers/of/irq.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/drivers/of/irq.c b/drivers/of/irq.c > >> index 352e14b007e7..949b9d1f8729 100644 > >> --- a/drivers/of/irq.c > >> +++ b/drivers/of/irq.c > >> @@ -440,6 +440,7 @@ int of_irq_count(struct device_node *dev) > >> > >> return nr; > >> } > >> +EXPORT_SYMBOL_GPL(of_irq_count); > > > > Please convert to use platform_irq_count() instead. > > That requires a platform_device to be passed to platform_irq_count(), > will that work even when the drivers remain built into the kernel and > get initialized early on? No, does your irqchip using this do both? Looks to me like it is always a platform_device. Rob