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 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A59E6C388F7 for ; Tue, 20 Oct 2020 15:51:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A56E22244 for ; Tue, 20 Oct 2020 15:51:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="UtVJOPbF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436884AbgJTPvm (ORCPT ); Tue, 20 Oct 2020 11:51:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436880AbgJTPvm (ORCPT ); Tue, 20 Oct 2020 11:51:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2670AC061755; Tue, 20 Oct 2020 08:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:References:Cc:To:From:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=xVKeiMQ1XLylJ8rSbId/RCAy2iAQfbZGLGK+XA6rX94=; b=UtVJOPbFEz+23s9lduIazooL87 wyK5qqwT/ZkhpfUlFSF2AenPee7/3CibKkGNLxmaIDAvl9lFhYiKR/r9hulwNnAQyYEHbTO12ApcL c2O4G2GaQtKYzJV6PSIJPUlzIeH+Agp8lsakx54ZRrVwopiPUi1oE8WpSRpATr1FekEHFVItUoRXQ 2i4DZyaw/Wq43wBLN3/e9eANpJZ0V9P+cnxiapGgazXjb4cUXQS3a4bF418vEArFtI5hs5xl0QbNg h4JhiENXQjY7JIdWdcEK33KuDWKrn+mgr6btmjMs9YNVZLWGCK8FNuZ5YwByRjFfGU3SEMwPUBLLM ln7AjsxQ==; Received: from [2601:1c0:6280:3f0::507c] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUtvF-0004kW-AN; Tue, 20 Oct 2020 15:51:37 +0000 Subject: Re: [PATCH] PCI: export pci_find_host_bridge() to fix MFD build error From: Randy Dunlap To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, kernel test robot , Thomas Bogendoerfer , Paul Burton , linux-mips@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Lee Jones , Thomas Bogendoerfer References: <20201019061453.32295-1-rdunlap@infradead.org> <20201020080219.GA21011@infradead.org> <45b16450-320b-86fd-603e-4fb311c6f4bd@infradead.org> Message-ID: <84b55881-21ba-aa5b-7b56-7d8e411771f9@infradead.org> Date: Tue, 20 Oct 2020 08:51:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <45b16450-320b-86fd-603e-4fb311c6f4bd@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 10/20/20 7:06 AM, Randy Dunlap wrote: > On 10/20/20 1:02 AM, Christoph Hellwig wrote: >> On Sun, Oct 18, 2020 at 11:14:53PM -0700, Randy Dunlap wrote: >>> Fix a build error in drivers/mfd/ioc.o by exporting >>> pci_find_host_bridge(). >>> >>> ERROR: modpost: "pci_find_host_bridge" [drivers/mfd/ioc3.ko] undefined! >> >> I think the mfd code should be fixed to not depend on such an internal >> symbol instead. >> > > Thanks for commenting. and I am not surprised. > > Adding Cc: for Thomas and Lee. BTW, if someone wants to use the MFD ioc3 driver now, without any source code patches, they can just build it in (SGI_MFD_IOC3=y) instead of building it as a loadable module. It builds successfully and can use pci_find_host_bridge(). pci_find_host_bridge() just isn't exported for loadable modules. So this could be useful (PCI=y): config SGI_MFD_IOC3 tristate "SGI IOC3 core driver" depends on PCI=y && MIPS && 64BIT select MFD_CORE -- ~Randy