Received: by 10.192.165.148 with SMTP id m20csp910181imm; Wed, 25 Apr 2018 09:29:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+IdENTyAkPuhco7l99Ptyy+dxIIDCNtHcaBvSUmMgv/LiogWnDGN881/KUfQffpzqfZiLd X-Received: by 2002:a17:902:6709:: with SMTP id f9-v6mr29496934plk.159.1524673746897; Wed, 25 Apr 2018 09:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524673746; cv=none; d=google.com; s=arc-20160816; b=hcdc5Ve8gRUHtk2iXQg2XMRmQyEdgiImkU/tJLo8RH0j4o385JJhMjtN1UM8PgflNq aEeBqBlFW0zR6G5wdfvLNMTUT4oGptEUjU+CrM2prer5I+3cbYuCLH+HsMDSYBKr4XJj TNepuz6mEDAYQ3l1b/IBEZqwdDBmoaK1M4F8JcCCPas99+OzOQK6iH4mQwDixpTfbB/O hVHhOXdHLrLFhD1dkXoxWajPxRvz5wJE3K+H2X85FdSSplQTUC1gKx5BZKqGC4VcVW7u 6hikxt2I2vKtFeP8feGCRQHPkizAZ/vsINMcuLZBs1hVihgP/wN8LLlowqSEVtGRwfA1 cjIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=XJZ2lCKwI4WCs48lAoTfzm3yfFtTSVHcbG/SXuxaL80=; b=s+RAnlrMPoCOpgaX2HyhQRSij7GWPuRDsThxNSg+QRjF+gOJTcJUVzUR3wfPpW1CXW W1wc3OiSH3Tf+RixJ1rvOytXZu0ETQelRD20wYdF91/xOkwYtIMMzhKGTSJU1WvMq+sC 8XBqzgPesBfxm2MVYHg6LSbRbd2u1S7bUO1QIRi+6sYoL0coDLENxuoYEvWH9qQa3sKZ d9jCmmb+yJmWnsyoJFwsi3nzF/BIEuCXI6+C5TYUupLEk/F2yPKIjtVVjG6ChaAqP0HW m+2l0qzQfbaI5Qi88C6NILfQQHympmb4K0+Fy0pD3qgLercUGWcaQ4NR2UpjhTzkhot+ Aj3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b186si13987831pgc.569.2018.04.25.09.28.52; Wed, 25 Apr 2018 09:29:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755334AbeDYQ14 (ORCPT + 99 others); Wed, 25 Apr 2018 12:27:56 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42696 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754196AbeDYQ1x (ORCPT ); Wed, 25 Apr 2018 12:27:53 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2DF1E80D; Wed, 25 Apr 2018 09:27:53 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.cambridge.arm.com [10.1.207.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2092B3F487; Wed, 25 Apr 2018 09:27:51 -0700 (PDT) Date: Wed, 25 Apr 2018 17:27:45 +0100 From: Lorenzo Pieralisi To: Jan Kiszka Cc: Bjorn Helgaas , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/6] PCI: Make pci_get_new_domain_nr static Message-ID: <20180425162745.GB21628@e107981-ln.cambridge.arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 05:13:37PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > The only user of that function is of_pci_bus_find_domain_nr. Pure > cleanup. "The only user of pci_get_new_domain_nr() is of_pci_bus_find_domain_nr(). Since they are defined in the same compilation unit, pci_get_new_domain_nr() can be made static, which also simplifies preprocessor conditionals. No functional change intended." > Signed-off-by: Jan Kiszka > --- > drivers/pci/pci.c | 6 ++---- > include/linux/pci.h | 3 --- > 2 files changed, 2 insertions(+), 7 deletions(-) Acked-by: Lorenzo Pieralisi > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index e597655a5643..695c2bb4e853 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -5702,15 +5702,14 @@ static void pci_no_domains(void) > #endif > } > > -#ifdef CONFIG_PCI_DOMAINS > +#ifdef CONFIG_PCI_DOMAINS_GENERIC > static atomic_t __domain_nr = ATOMIC_INIT(-1); > > -int pci_get_new_domain_nr(void) > +static int pci_get_new_domain_nr(void) > { > return atomic_inc_return(&__domain_nr); > } > > -#ifdef CONFIG_PCI_DOMAINS_GENERIC > static int of_pci_bus_find_domain_nr(struct device *parent) > { > static int use_dt_domains = -1; > @@ -5765,7 +5764,6 @@ int pci_bus_find_domain_nr(struct pci_bus *bus, struct device *parent) > acpi_pci_bus_find_domain_nr(bus); > } > #endif > -#endif > > /** > * pci_ext_cfg_avail - can we access extended PCI config space? > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 73178a2fcee0..963232a6cd2e 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1510,12 +1510,10 @@ void pci_cfg_access_unlock(struct pci_dev *dev); > */ > #ifdef CONFIG_PCI_DOMAINS > extern int pci_domains_supported; > -int pci_get_new_domain_nr(void); > #else > enum { pci_domains_supported = 0 }; > static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } > static inline int pci_proc_domain(struct pci_bus *bus) { return 0; } > -static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } > #endif /* CONFIG_PCI_DOMAINS */ > > /* > @@ -1670,7 +1668,6 @@ static inline struct pci_dev *pci_get_domain_bus_and_slot(int domain, > > static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } > static inline struct pci_dev *pci_dev_get(struct pci_dev *dev) { return NULL; } > -static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } > > #define dev_is_pci(d) (false) > #define dev_is_pf(d) (false) > -- > 2.13.6 >