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 arg

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Backport: PCI: remove unnecessary arg of pci_update_resource()
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Mar 2009 00:50:23 -0700
Delivery-date: Fri, 13 Mar 2009 00:51:52 -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 1236930133 0
# Node ID f0dd7eb92bc9db85f5f652e7e61fbadbd6ec6752
# Parent  e3cec0113535268ddc018f0de36202f4ba570ecf
Backport: PCI: remove unnecessary arg of pci_update_resource()

    commit 14add80b5120966fe0659d61815b9e9b4b68fdc5
    Author: Yu Zhao <yu.zhao@xxxxxxxxx>
    Date:   Sat Nov 22 02:38:52 2008 +0800

    PCI: remove unnecessary arg of pci_update_resource()

    This cleanup removes unnecessary argument 'struct resource *res'
    in
    pci_update_resource(), so it takes same arguments as other
    companion
    functions (pci_assign_resource(), etc.).

    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       |    4 ++--
 drivers/pci/quirks.c    |    2 +-
 drivers/pci/setup-res.c |    7 ++++---
 include/linux/pci.h     |    2 +-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff -r e3cec0113535 -r f0dd7eb92bc9 drivers/pci/pci.c
--- a/drivers/pci/pci.c Fri Mar 13 07:41:52 2009 +0000
+++ b/drivers/pci/pci.c Fri Mar 13 07:42:13 2009 +0000
@@ -273,8 +273,8 @@ pci_restore_bars(struct pci_dev *dev)
                return;
        }
 
-       for (i = 0; i < numres; i ++)
-               pci_update_resource(dev, &dev->resource[i], i);
+       for (i = 0; i < numres; i++)
+               pci_update_resource(dev, &dev->resource[i]);
 }
 
 int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t t);
diff -r e3cec0113535 -r f0dd7eb92bc9 drivers/pci/quirks.c
--- a/drivers/pci/quirks.c      Fri Mar 13 07:41:52 2009 +0000
+++ b/drivers/pci/quirks.c      Fri Mar 13 07:42:13 2009 +0000
@@ -56,7 +56,7 @@ static void __devinit quirk_release_reso
                        r->start = 0;
 
                        if (i < PCI_BRIDGE_RESOURCES) {
-                               pci_update_resource(dev, r, i);
+                               pci_update_resource(dev, i);
                        }
                }
                /* need to disable bridge's resource window,
diff -r e3cec0113535 -r f0dd7eb92bc9 drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c   Fri Mar 13 07:41:52 2009 +0000
+++ b/drivers/pci/setup-res.c   Fri Mar 13 07:42:13 2009 +0000
@@ -27,11 +27,12 @@
 
 
 void
-pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
+pci_update_resource(struct pci_dev *dev, int resno)
 {
        struct pci_bus_region region;
        u32 new, check, mask;
        int reg;
+       struct resource *res = dev->resource + resno;
 
        /* Ignore resources for unimplemented BARs and unused resource slots
           for 64 bit BARs. */
@@ -183,7 +184,7 @@ int pci_assign_resource(struct pci_dev *
                                "%016llx - %016llx\n", resno, pci_name(dev),
                                 (unsigned long long)res->start,
                                 (unsigned long long)res->end);
-               pci_update_resource(dev, res, resno);
+               pci_update_resource(dev, resno);
        }
 
        return ret;
@@ -221,7 +222,7 @@ int pci_assign_resource_fixed(struct pci
                        resno, (unsigned long long)(res->end - res->start + 1),
                        (unsigned long long)res->start, pci_name(dev));
        } else if (resno < PCI_BRIDGE_RESOURCES) {
-               pci_update_resource(dev, res, resno);
+               pci_update_resource(dev, resno);
        }
 
        return ret;
diff -r e3cec0113535 -r f0dd7eb92bc9 include/linux/pci.h
--- a/include/linux/pci.h       Fri Mar 13 07:41:52 2009 +0000
+++ b/include/linux/pci.h       Fri Mar 13 07:42:13 2009 +0000
@@ -500,7 +500,7 @@ void pci_intx(struct pci_dev *dev, int e
 void pci_intx(struct pci_dev *dev, int enable);
 int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
 int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
-void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
+void pci_update_resource(struct pci_dev *dev, int resno);
 int pci_assign_resource(struct pci_dev *dev, int i);
 int pci_assign_resource_fixed(struct pci_dev *dev, int i);
 void pci_restore_bars(struct pci_dev *dev);

_______________________________________________
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 arg of pci_update_resource(), Xen patchbot-linux-2.6.18-xen <=