Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3765146imw; Mon, 11 Jul 2022 15:37:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1upMsJkeHZGdUyZ9R/Xvf/iUTZF7mbTTnm+QUJwR/+TCIV6jOMdL1TAYw6lDBSdawSFp+vV X-Received: by 2002:a63:4756:0:b0:412:88b5:2a23 with SMTP id w22-20020a634756000000b0041288b52a23mr17603975pgk.442.1657579074078; Mon, 11 Jul 2022 15:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657579074; cv=none; d=google.com; s=arc-20160816; b=WTwyoIrWidmsfVFDXtahcQD+ryIgQMvP50UIp6qIpKnwWbAVU94N6c07Ctwywm+EHP 12sd2HJYVPHpJxpEXGvAgxbjnKd93iU99Hg2oXlOweBYjec+S0Zqop16r0CIL8PW+aqr fkI08UB5AdmygtKzisigY31h6kHnmQM8Yy+kdYAtwNz2r+krRQUZI8nNWL+SDms7nfSw kjRp+Hds4A5Bd2O6i5GJIfulDYH8t447gaKoYz9nhiwSfdz9QMkOWUlub+bvvrsMFt/w DMC52NwanZ/BkVWNF//29tD/JnpFzfijI9rzK5w3GaOEHx+/dG4nXDCzRjHC1gjHiX78 zYPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=AfI4gWL+95oO+VTReRb0mDiW5Oe+QyPg6U6OhSijW5c=; b=N29cAIXdnzbynWOfsmJMiMDdUP85G8X6O8XJqXN3urNGvedj9pJ7PH8nImyZZShbeo c/RBOv1B9bVUFZGJl4x9WKDyfGi1LqY46qwt0iTBSeTZ6+uQax6mtoxWgazMTtXCy6O4 E/SBAfKBq4QCpP4KRvEJ0WmSLMS6WfMOEfNYUl049cVPfnU4X0/SO+f0sVOJwFOohod8 xzEJ92h4ul+YQzA5srYUwhl+v4ABtvpJgS7S+uqYSir51/wGt/00hT4OGgBiMhGPDy14 XHzV6Nf0F3F17FSC1sRqScaC3OcT7+5dc5ZAfIDdua6H0CCOdyCM55tPVDjhZpnBxrKs O5qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pjlkaOk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t25-20020a62d159000000b0052550da6c0bsi11573309pfl.29.2022.07.11.15.37.41; Mon, 11 Jul 2022 15:37:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pjlkaOk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230232AbiGKWgB (ORCPT + 99 others); Mon, 11 Jul 2022 18:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiGKWgA (ORCPT ); Mon, 11 Jul 2022 18:36:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8C4F31230; Mon, 11 Jul 2022 15:35:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7ED31B815FB; Mon, 11 Jul 2022 22:35:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E016BC3411C; Mon, 11 Jul 2022 22:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657578957; bh=7G6pKX09/F97v2cQQOGAgqFzqkQnDmYMUvTgW5etn68=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=pjlkaOk7gXsJfMHGs2uR127IsIiny3oS5RupRJ+cnoJubzAyUNhCn5ktZYt+bkkLP ZbDtX8n7xLsb/Br8Mv1I2wz4XulKqiAEcblcVYQnZpDR2Bp6Maf71Fs6eMaIOIztNp Ex51UBpuF1hijYOOwxJXM1cqULQdAFk+/v7KxUmgZQ183V7UkdKwISf2LEig3t/bcP vocLQjmt1VTrQXzg5usCbUQTFHRWOqs7iMETGyzXyCnTzT7wZlsgL51BKRD+3E167Y oD3SYrSVN9/Lz5z2xJj2RNHPyrHh9LS84MX3Q5NixXad+uW+5T5NxNQJIxJyI0r+6o /k9ndLEaU+MOQ== Date: Mon, 11 Jul 2022 17:35:55 -0500 From: Bjorn Helgaas To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Christophe Leroy , =?iso-8859-1?Q?C=E9dric?= Le Goater , Nick Child , linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code Message-ID: <20220711223555.GA702011@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220706104308.5390-2-pali@kernel.org> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 06, 2022 at 12:43:04PM +0200, Pali Roh?r wrote: > Function pci_device_from_OF_node() is used only in powermac code. > So hide it from all other platforms as it is unsed. s/unsed/unused/ (same typo in 3/5 patch) These are for the powerpc folks, so I'm just kibbitzing here. > Signed-off-by: Pali Roh?r > --- > arch/powerpc/include/asm/pci-bridge.h | 2 ++ > arch/powerpc/kernel/pci_32.c | 2 ++ > arch/powerpc/kernel/pci_64.c | 2 ++ > 3 files changed, 6 insertions(+) > > diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h > index c85f901227c9..98156932a1f5 100644 > --- a/arch/powerpc/include/asm/pci-bridge.h > +++ b/arch/powerpc/include/asm/pci-bridge.h > @@ -170,8 +170,10 @@ static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) > return bus->sysdata; > } > > +#ifdef CONFIG_PPC_PMAC > extern int pci_device_from_OF_node(struct device_node *node, > u8 *bus, u8 *devfn); > +#endif > #ifndef CONFIG_PPC64 > > extern void pci_create_OF_bus_map(void); > diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c > index 5a174936c9a0..c3b91fb62a71 100644 > --- a/arch/powerpc/kernel/pci_32.c > +++ b/arch/powerpc/kernel/pci_32.c > @@ -154,6 +154,7 @@ pcibios_make_OF_bus_map(void) > } > > > +#ifdef CONFIG_PPC_PMAC > /* > * Returns the PCI device matching a given OF node > */ > @@ -193,6 +194,7 @@ int pci_device_from_OF_node(struct device_node *node, u8 *bus, u8 *devfn) > return -ENODEV; > } > EXPORT_SYMBOL(pci_device_from_OF_node); > +#endif > > /* We create the "pci-OF-bus-map" property now so it appears in the > * /proc device tree > diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c > index 19b03ddf5631..0c7cfb9fab04 100644 > --- a/arch/powerpc/kernel/pci_64.c > +++ b/arch/powerpc/kernel/pci_64.c > @@ -286,6 +286,7 @@ int pcibus_to_node(struct pci_bus *bus) > EXPORT_SYMBOL(pcibus_to_node); > #endif > > +#ifdef CONFIG_PPC_PMAC > int pci_device_from_OF_node(struct device_node *np, u8 *bus, u8 *devfn) > { > if (!PCI_DN(np)) > @@ -294,3 +295,4 @@ int pci_device_from_OF_node(struct device_node *np, u8 *bus, u8 *devfn) > *devfn = PCI_DN(np)->devfn; > return 0; > } > +#endif > -- > 2.20.1 >