From patchwork Fri Apr 8 00:15:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 8778801 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7243F9F36E for ; Fri, 8 Apr 2016 00:27:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A7BD20204 for ; Fri, 8 Apr 2016 00:27:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCBAD20222 for ; Fri, 8 Apr 2016 00:26:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932606AbcDHAWT (ORCPT ); Thu, 7 Apr 2016 20:22:19 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:36598 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932589AbcDHAWR (ORCPT ); Thu, 7 Apr 2016 20:22:17 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u380GqTw003179 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2016 00:16:53 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u380GqWq019640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2016 00:16:52 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u380GpSE025398; Fri, 8 Apr 2016 00:16:51 GMT Received: from aserv0022.oracle.com (/10.132.126.127) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Apr 2016 17:16:50 -0700 From: Yinghai Lu To: Bjorn Helgaas , David Miller , Benjamin Herrenschmidt , Linus Torvalds Cc: Wei Yang , TJ , Yijing Wang , Khalid Aziz , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu Subject: [PATCH v11 32/60] PCI: Rename pdev_sort_resources() to pdev_assign_resources_prepare() Date: Thu, 7 Apr 2016 17:15:45 -0700 Message-Id: <1460074573-7481-33-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1460074573-7481-1-git-send-email-yinghai@kernel.org> References: <1460074573-7481-1-git-send-email-yinghai@kernel.org> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pdev_sort_resources() etc was checking devices resources and putting resources that need to assign to one list in sorted order. Now we don't do sorting in those functions anymore, so change to pdev_assign_resources_prepare() instead. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 0e3be10..9cd0411 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -204,8 +204,8 @@ static resource_size_t __pci_resource_alignment( return r_align; } -/* Sort resources by alignment */ -static void pdev_sort_resources(struct pci_dev *dev, +/* check resources and save to the list */ +static void pdev_assign_resources_prepare(struct pci_dev *dev, struct list_head *realloc_head, struct list_head *head) { @@ -241,7 +241,7 @@ static void pdev_sort_resources(struct pci_dev *dev, } } -static void __dev_sort_resources(struct pci_dev *dev, +static void __dev_assign_resources_prepare(struct pci_dev *dev, struct list_head *realloc_head, struct list_head *head) { @@ -259,7 +259,7 @@ static void __dev_sort_resources(struct pci_dev *dev, return; } - pdev_sort_resources(dev, realloc_head, head); + pdev_assign_resources_prepare(dev, realloc_head, head); } static inline void reset_resource(struct resource *res) @@ -565,7 +565,7 @@ static void pdev_assign_resources_sorted(struct pci_dev *dev, { LIST_HEAD(head); - __dev_sort_resources(dev, add_head, &head); + __dev_assign_resources_prepare(dev, add_head, &head); __assign_resources_sorted(&head, add_head, fail_head); } @@ -578,7 +578,7 @@ static void pbus_assign_resources_sorted(const struct pci_bus *bus, LIST_HEAD(head); list_for_each_entry(dev, &bus->devices, bus_list) - __dev_sort_resources(dev, realloc_head, &head); + __dev_assign_resources_prepare(dev, realloc_head, &head); __assign_resources_sorted(&head, realloc_head, fail_head); }