lkml.org 
[lkml]   [2011]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/4] PCI: introduce reset_resource()
    On Mon, 14 Feb 2011 17:43:19 -0800
    Ram Pai <linuxram@us.ibm.com> wrote:

    > introduced reset_resource() which factors out resource reset logic.
    >
    > Signed-off-by: Ram Pai <linuxram@us.ibm.com>
    > ---
    > drivers/pci/setup-bus.c | 11 ++++++++---
    > 1 files changed, 8 insertions(+), 3 deletions(-)
    >
    > diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
    > index bcf5752..a94ecc1 100644
    > --- a/drivers/pci/setup-bus.c
    > +++ b/drivers/pci/setup-bus.c
    > @@ -88,6 +88,13 @@ static void __dev_sort_resources(struct pci_dev *dev,
    > pdev_sort_resources(dev, head);
    > }
    >
    > +static inline void reset_resource(struct resource *res)
    > +{
    > + res->start = 0;
    > + res->end = 0;
    > + res->flags = 0;
    > +}
    > +

    Probably belongs in resource.c, and there may be other users that can
    be cleaned up as well. Nice improvement to readability.

    --
    Jesse Barnes, Intel Open Source Technology Center


    \
     
     \ /
      Last update: 2011-02-25 23:59    [W:7.634 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site