From patchwork Thu Sep 13 16:00:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 1453441 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 858183FE79 for ; Thu, 13 Sep 2012 16:02:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758541Ab2IMQCq (ORCPT ); Thu, 13 Sep 2012 12:02:46 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:39282 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758534Ab2IMQCp (ORCPT ); Thu, 13 Sep 2012 12:02:45 -0400 Received: by mail-pb0-f46.google.com with SMTP id rr13so4170633pbb.19 for ; Thu, 13 Sep 2012 09:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=RkopmA2iMqFJfMb+hEUG/HVt+nD7IrcY4+ZQO2Cpzck=; b=z2sgEb2U0X+E7scK++rNZpdCVFDetuJ4AfSURVZAKbsflfEUpnAUmhp9whEZEs6eQ3 k1QwI2nFFfwFdsyjUWnfzGTB6OQYj/LCvR/6vUhpzsjgUNEeyjaSowDa35cjJ5YJzR44 MC5iRGBMk6JNYyvJKTelrM5oNYkol8lCfribG30ggOBgLYzkA4ziD45zOnvyVUO0JN8D w+MzlAe6QIO9epAX/wguSyQUIVj/ZStd2QyDB+DUaNIQDvWPk9WEVF0WoM2SHa3d0N5G Qe9klfaJCXngSEa6ex/ByBXeu2AFRm01iDZaZrkfVToScrRKXQ4BCuWd/g9gXUztZTFd 5hpA== Received: by 10.68.131.2 with SMTP id oi2mr166553pbb.78.1347552165562; Thu, 13 Sep 2012 09:02:45 -0700 (PDT) Received: from localhost.localdomain ([221.221.18.122]) by mx.google.com with ESMTPS id vz8sm7107290pbc.63.2012.09.13.09.02.37 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Sep 2012 09:02:44 -0700 (PDT) From: Jiang Liu To: Bjorn Helgaas Cc: Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu Subject: [PATCH 2/2] PCI: remove host bridge hotplug unsafe interface pci_get_next_bus() Date: Fri, 14 Sep 2012 00:00:10 +0800 Message-Id: <1347552010-6718-2-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347552010-6718-1-git-send-email-jiang.liu@huawei.com> References: <1347552010-6718-1-git-send-email-jiang.liu@huawei.com> In-Reply-To: References: Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Remove host bridge hotplug unsafe interface pci_get_next_bus(), it has been replaced by pci_{get|put}_root_buses(). Signed-off-by: Jiang Liu --- drivers/pci/search.c | 25 ------------------------- include/linux/pci.h | 4 ---- 2 files changed, 29 deletions(-) diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 8b20a33..7aadd45 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -116,30 +116,6 @@ struct pci_bus * pci_find_bus(int domain, int busnr) return bus; } -/** - * pci_find_next_bus - begin or continue searching for a PCI bus - * @from: Previous PCI bus found, or %NULL for new search. - * - * Iterates through the list of known PCI busses. A new search is - * initiated by passing %NULL as the @from argument. Otherwise if - * @from is not %NULL, searches continue from next device on the - * global list. - */ -struct pci_bus * -pci_find_next_bus(const struct pci_bus *from) -{ - struct list_head *n; - struct pci_bus *b = NULL; - - WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); - n = from ? from->node.next : pci_root_buses.next; - if (n != &pci_root_buses) - b = pci_bus_b(n); - up_read(&pci_bus_sem); - return b; -} - struct pci_bus ** pci_get_root_buses(int *bus_num) { @@ -396,7 +372,6 @@ EXPORT_SYMBOL(pci_dev_present); /* For boot time work */ EXPORT_SYMBOL(pci_find_bus); -EXPORT_SYMBOL(pci_find_next_bus); /* For everyone */ EXPORT_SYMBOL(pci_get_device); EXPORT_SYMBOL(pci_get_subsys); diff --git a/include/linux/pci.h b/include/linux/pci.h index bc1ab5f..ea78235 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -756,7 +756,6 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap); int pci_find_next_ext_capability(struct pci_dev *dev, int pos, int cap); int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); -struct pci_bus *pci_find_next_bus(const struct pci_bus *from); struct pci_bus ** pci_get_root_buses(int *bus_num); void pci_put_root_buses(struct pci_bus **buses, int count); @@ -1401,9 +1400,6 @@ static inline int pci_block_cfg_access_in_atomic(struct pci_dev *dev) static inline void pci_unblock_cfg_access(struct pci_dev *dev) { } -static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from) -{ return NULL; } - static inline struct pci_bus ** pci_get_root_buses(int *bus_num) { *bus_num = 0;