Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932282Ab3FAGFF (ORCPT ); Sat, 1 Jun 2013 02:05:05 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25788 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067Ab3FAGEf (ORCPT ); Sat, 1 Jun 2013 02:04:35 -0400 From: Yinghai Lu To: Bjorn Helgaas , Benjamin Herrenschmidt , Gavin Shan Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu Subject: [PATCH v5 2/7] PCI: Don't use temp bus for pci_bus_release_bridge_resources Date: Fri, 31 May 2013 23:03:07 -0700 Message-Id: <1370066593-22736-2-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1370066593-22736-1-git-send-email-yinghai@kernel.org> References: <1370066593-22736-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1342 Lines: 36 as later bus can not be used as temp variable after we change to per root bus handling with assign unassigned resources. Per Bjorn, separate it from big patch that handing assign_unssigned per root bus. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) Index: linux-2.6/drivers/pci/setup-bus.c =================================================================== --- linux-2.6.orig/drivers/pci/setup-bus.c +++ linux-2.6/drivers/pci/setup-bus.c @@ -1526,12 +1526,11 @@ again: * Try to release leaf bridge's resources that doesn't fit resource of * child device under that bridge */ - list_for_each_entry(fail_res, &fail_head, list) { - bus = fail_res->dev->bus; - pci_bus_release_bridge_resources(bus, + list_for_each_entry(fail_res, &fail_head, list) + pci_bus_release_bridge_resources(fail_res->dev->bus, fail_res->flags & type_mask, rel_type); - } + /* restore size and flags */ list_for_each_entry(fail_res, &fail_head, list) { struct resource *res = fail_res->res; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/