LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/6] PCI: Make pci_get_new_domain_nr static
Date: Wed, 25 Apr 2018 19:21:12 +0200	[thread overview]
Message-ID: <db40716e-85ac-a91d-98a9-81accb2b6756@siemens.com> (raw)
In-Reply-To: <20180425162745.GB21628@e107981-ln.cambridge.arm.com>

On 2018-04-25 18:27, Lorenzo Pieralisi wrote:
> On Tue, Apr 24, 2018 at 05:13:37PM +0200, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> 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."
> 

Thanks, wording adopted for v2.

Jan

>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  drivers/pci/pci.c   | 6 ++----
>>  include/linux/pci.h | 3 ---
>>  2 files changed, 2 insertions(+), 7 deletions(-)
> 
> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> 
>> 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
>>

  reply	other threads:[~2018-04-25 17:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 15:13 [PATCH 0/6] PCI: leak fixes, removable generic PCI host, assorted stuff Jan Kiszka
2018-04-24 15:13 ` [PATCH 1/6] PCI: Make pci_get_new_domain_nr static Jan Kiszka
2018-04-25 16:27   ` Lorenzo Pieralisi
2018-04-25 17:21     ` Jan Kiszka [this message]
2018-04-24 15:13 ` [PATCH 2/6] PCI: Fix memory leak of devm_pci_alloc_host_bridge Jan Kiszka
2018-04-24 15:13 ` [PATCH 3/6] PCI: Introduce devm_of_pci_get_host_bridge_resources Jan Kiszka
2018-04-25 10:40   ` Jan Kiszka
2018-04-27 22:24   ` Bjorn Helgaas
2018-04-28  7:28     ` Jan Kiszka
2018-04-30 18:40       ` Bjorn Helgaas
2018-04-30 18:43         ` Sinan Kaya
2018-05-02  5:39           ` Jan Kiszka
2018-04-24 15:13 ` [PATCH 4/6] PCI: Convert of_pci_get_host_bridge_resources users to devm variant Jan Kiszka
2018-04-25 19:47   ` Jingoo Han
2018-04-24 15:13 ` [PATCH 5/6] PCI: Add support for unbinding the generic PCI host controller Jan Kiszka
2018-04-24 15:13 ` [PATCH 6/6] arm: Allow to enable PCI_DOMAINS manually Jan Kiszka
2018-04-25 17:54   ` Lorenzo Pieralisi
2018-04-26  7:19     ` Jan Kiszka
2018-04-27 22:16 ` [PATCH 0/6] PCI: leak fixes, removable generic PCI host, assorted stuff Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db40716e-85ac-a91d-98a9-81accb2b6756@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=bhelgaas@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --subject='Re: [PATCH 1/6] PCI: Make pci_get_new_domain_nr static' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).