Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1206320rwl; Thu, 10 Aug 2023 07:57:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX9xOWeLXUzBh/CTjz775YitTTcvDZgoklSQJV1pUW5CwkXLYIjutj1QpcNdRt63wpvBzw X-Received: by 2002:a05:6512:ea0:b0:4fb:772a:af13 with SMTP id bi32-20020a0565120ea000b004fb772aaf13mr2280649lfb.28.1691679421107; Thu, 10 Aug 2023 07:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691679421; cv=none; d=google.com; s=arc-20160816; b=z1KRbTL8dV5gMEyPWXsXmhqDTShABm7yh+ERyqegS3R4or6dStXuT6RHEboTM3Q2qZ y/jjSzEU2zQTdzvUP848RFemvDn3O/IsKY7eOPypHZr93TMEMPlosbUIRPjJouusOhD5 OAWR61jAp1+H7gwiDz97gIuPwp2MhcJ4XeZPVCc2SlaEcmRgFCU/bGRrOfHYP9NI6I2l 2fQXzok69ARea5R8Yk9hPOPJbUkCUrH7zLQYvfM57nO9+LaPJ76hFbU4kz5u678dSdNh G7vTdoYfG11atcBXkpwGlyirqeXyPM2Z4Z/n9yosDbDcE7iVdDv0S2OzJCBQx5l5Muu3 Ubmw== 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-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=O6BLPhRTkTfj/jWxGuMNP2f56GANIRYFOFDMaD6rmMg=; fh=71fze8MpQITSpDWNqmGTynQdcbNqu4E5/LQQy3CQqCQ=; b=V3fTDwh4PNpQDBDJrbOirXsM9ynPHAVvVONcpp8rYOupunRRorBAx8sMutPDJuCJQ8 LtF4klyhiupRszkYkRnNiKyQZ92WqU1YceL0lPTlMwCEtSwH8/6VMP4e+dcCJjdtCkxE kkF0fbFgpvRcm0ulw64hDh3MoCxMTN2bVU6Tyd4vuw5F2RbJXdiOYqSjGfvVcsIjKShZ MThjz4V3vPVxYQsgqj7cdVK5zuF3jachjP7F6V79q/1N7k5T8ULU9mfjSWJjne4Ts+ux cB9zYh8zIbWAY8b8b/wZpPHd0YAeG7a4AM8ktdRyXsfk/EFfJtppbuu4Q5k0TfFATStj Rwkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=laTmVQiB; 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 s4-20020a056402164400b0052348d74868si1557456edx.238.2023.08.10.07.56.36; Thu, 10 Aug 2023 07:57:01 -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=laTmVQiB; 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 S234883AbjHJOim (ORCPT + 99 others); Thu, 10 Aug 2023 10:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235828AbjHJOil (ORCPT ); Thu, 10 Aug 2023 10:38:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A8626A8; Thu, 10 Aug 2023 07:38:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A215665E46; Thu, 10 Aug 2023 14:38:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA752C433CD; Thu, 10 Aug 2023 14:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691678317; bh=6aZdlG0TFjmXA9MTJdarW9ykuWmFLg+ezFHrHCAQUFE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=laTmVQiB5UMAERREp8XOd8fnZfQJvcWru0BfS09a8TVtSLStx72PrB8yu1LjtxbsT HNdmQXR2UbueO4Frz4mPbMIBTCUU+WHAoyeOwWQxLhcxYblCihm2P8Wj8CaspiXl9B cj2VXaSGrJtb4bM3TmCsImOBnpzazRXMAV5Q+/kSEdO/7xCmk8fR++d+xXWXSP1Lfh c0yty67HD4DNxWnqkVOmvliq6XphZCpqpLyIrjo1xSF7CMGcTRSbCSWtOJJk9qkXCc eDcgH4Xk6dgO/F4ANTHVgoe41mYEgexj791kDUPK2TMlsVx7f8uetjVEIj/jEPX8pu cIqrXChQ7kaGA== Date: Thu, 10 Aug 2023 09:38:34 -0500 From: Bjorn Helgaas To: Arnd Bergmann Cc: Andrew Morton , linux-kernel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Bjorn Helgaas , Arnd Bergmann , Thomas Gleixner , Andy Shevchenko , Dan Williams , Kuppuswamy Sathyanarayanan , Christophe JAILLET , Reinette Chatre , Ira Weiny , Mika Westerberg , "Ahmed S. Darwish" , Sami Tolvanen , linux-alpha@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 04/17] pci: sysfs: move declarations to linux/pci.h Message-ID: <20230810143834.GA29233@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230810141947.1236730-5-arnd@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Thu, Aug 10, 2023 at 04:19:22PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > A couple of architectures build the __weak versions of > pci_create_resource_files() and pci_remove_resource_files() but don't > have prototypes for these, which causes warnings: > > drivers/pci/pci-sysfs.c:1253:12: error: no previous prototype for 'pci_create_resource_files' [-Werror=missing-prototypes] > 1253 | int __weak pci_create_resource_files(struct pci_dev *dev) { return 0; } > drivers/pci/pci-sysfs.c:1254:13: error: no previous prototype for 'pci_remove_resource_files' [-Werror=missing-prototypes] > 1254 | void __weak pci_remove_resource_files(struct pci_dev *dev) { return; } > > Move the prototypes from alpha architecture into the global header to > avoid these warnings for all of them. > > Signed-off-by: Arnd Bergmann Applied to pci/misc for v6.6, thanks! > --- > arch/alpha/include/asm/pci.h | 3 --- > include/linux/pci.h | 5 +++++ > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/arch/alpha/include/asm/pci.h b/arch/alpha/include/asm/pci.h > index 6312656279d79..6c04fcbdc8ed2 100644 > --- a/arch/alpha/include/asm/pci.h > +++ b/arch/alpha/include/asm/pci.h > @@ -88,7 +88,4 @@ extern void pci_adjust_legacy_attr(struct pci_bus *bus, > enum pci_mmap_state mmap_type); > #define HAVE_PCI_LEGACY 1 > > -extern int pci_create_resource_files(struct pci_dev *dev); > -extern void pci_remove_resource_files(struct pci_dev *dev); > - > #endif /* __ALPHA_PCI_H */ > diff --git a/include/linux/pci.h b/include/linux/pci.h > index eeb2e6f6130f4..198a399c4b792 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -2260,6 +2260,11 @@ int pcibios_alloc_irq(struct pci_dev *dev); > void pcibios_free_irq(struct pci_dev *dev); > resource_size_t pcibios_default_alignment(void); > > +#if !defined(HAVE_PCI_MMAP) && !defined(ARCH_GENERIC_PCI_MMAP_RESOURCE) > +extern int pci_create_resource_files(struct pci_dev *dev); > +extern void pci_remove_resource_files(struct pci_dev *dev); > +#endif > + > #if defined(CONFIG_PCI_MMCONFIG) || defined(CONFIG_ACPI_MCFG) > void __init pci_mmcfg_early_init(void); > void __init pci_mmcfg_late_init(void); > -- > 2.39.2 >