Received: by 10.192.165.148 with SMTP id m20csp993534imm; Wed, 25 Apr 2018 10:48:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx49t08uqjnmR4zWJprZVLF6Ec36dqBlmg10+kufkRlR8fWLCAOANRW3K3gF5Z+WguIGqSosD X-Received: by 10.98.246.25 with SMTP id x25mr28800836pfh.138.1524678530060; Wed, 25 Apr 2018 10:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524678530; cv=none; d=google.com; s=arc-20160816; b=SYZKQ7xM3IkRRzxjrKJCpWT3ePQHu3BLMN87JDBWa7wAqo6y3xTP57WQwgJFjidXPG lNO0EJKXxv7YoHbi8e2IMgpqAgkxp5gHe33+ahuiYPniHzr8xyeFoTjwGNYAeCbX7Bko kFAHqzg5a9m7J+7HKIE6uqMS9MS1cwMNL20IvurlM43V9KiqIRgbfyl2ht/Z8gyFsqlc GMUXISjuf/Lln7orCOg7IGpxbsjCrgKqrGF1zodYzl0SUeCaR1WGVx66eXwjv3OtxfnX Poe+fm70/lu03btaKbWZduxBqq5ebSSm26xYcwTodTdBuhiTFabslkiOJiU1MTjk03zV FHEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=0QIhAl4LEMAUFNbzCemxHfHcjQHcHYW2roDmTRxxP1k=; b=oK+vq+DlDeRTvBNnkNU6Vz/izgmfbA4Cd58jyfdK2TRx/qRVVy8dBY+EBY3QOsjXrN L1Uh/vgXdNdodsWJ66AhAIeUpUSUQ7nqhcr8jiA9FCwtIKRJmnFOpW3MOpOJMA7kN6Sa TigHFAPPzzQkMrtL6ThX8PKzbHNyy/abLw7o1hM6VPl/X0qbhLw02l2T7RL4+idiuCXU bHJEjA+mDfsSRHHhboN36C5EiS5ViM7U9Qo2gLhVvmlGWr0A06Ncxutua59kJUdKlJZ0 hLvqzCN8xyVblN9I6cmW06W1m3lLr0fp2YeVh7re06GUOn8qxFS2bjHm7i/vVScaOPTQ 1CDg== 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 r3-v6si18612227pli.324.2018.04.25.10.48.35; Wed, 25 Apr 2018 10:48:50 -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 S1756042AbeDYRpx (ORCPT + 99 others); Wed, 25 Apr 2018 13:45:53 -0400 Received: from david.siemens.de ([192.35.17.14]:43227 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755223AbeDYRpu (ORCPT ); Wed, 25 Apr 2018 13:45:50 -0400 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w3PHLEGC016121 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Apr 2018 19:21:14 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w3PHLD9u005234; Wed, 25 Apr 2018 19:21:13 +0200 Subject: Re: [PATCH 1/6] PCI: Make pci_get_new_domain_nr static To: Lorenzo Pieralisi Cc: Bjorn Helgaas , Linux Kernel Mailing List , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20180425162745.GB21628@e107981-ln.cambridge.arm.com> From: Jan Kiszka Openpgp: preference=signencrypt Message-ID: Date: Wed, 25 Apr 2018 19:21:12 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180425162745.GB21628@e107981-ln.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> >> 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 >> --- >> 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 >>