WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] Backport: PCI: remove unnecessary con

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Backport: PCI: remove unnecessary condition check in pci_restore_bars()
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Mar 2009 01:55:06 -0700
Delivery-date: Fri, 13 Mar 2009 01:55:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236934244 0
# Node ID 9b150690cb22eeb0504d00a884314f288088aeae
# Parent  f77ac4979fae40185d00543d99f789d84c9d1f41
Backport: PCI: remove unnecessary condition check in pci_restore_bars()

    commit bc5f5a8277cb353161454b6704b3186ebcf3a2a3
    Author: Yu Zhao <yu.zhao@xxxxxxxxx>
    Date:   Sat Nov 22 02:40:00 2008 +0800

    PCI: remove unnecessary condition check in pci_restore_bars()

    Remove the unnecessary number of resources condition checks
    because
    the pci_update_resource() will check availability of the
    resources.

    Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
    Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>

Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
---
 drivers/pci/pci.c |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff -r f77ac4979fae -r 9b150690cb22 drivers/pci/pci.c
--- a/drivers/pci/pci.c Fri Mar 13 08:50:15 2009 +0000
+++ b/drivers/pci/pci.c Fri Mar 13 08:50:44 2009 +0000
@@ -256,25 +256,10 @@ void
 void
 pci_restore_bars(struct pci_dev *dev)
 {
-       int i, numres;
-
-       switch (dev->hdr_type) {
-       case PCI_HEADER_TYPE_NORMAL:
-               numres = 6;
-               break;
-       case PCI_HEADER_TYPE_BRIDGE:
-               numres = 2;
-               break;
-       case PCI_HEADER_TYPE_CARDBUS:
-               numres = 1;
-               break;
-       default:
-               /* Should never get here, but just in case... */
-               return;
-       }
-
-       for (i = 0; i < numres; i++)
-               pci_update_resource(dev, &dev->resource[i]);
+       int i;
+
+       for (i = 0; i < PCI_BRIDGE_RESOURCES; i++)
+               pci_update_resource(dev, i);
 }
 
 int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t t);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Backport: PCI: remove unnecessary condition check in pci_restore_bars(), Xen patchbot-linux-2.6.18-xen <=