lkml.org 
[lkml]   [2009]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/21] amd64_edac: add f10-and-later methods-p2

--- On Mon, 5/4/09, Mauro Carvalho Chehab <mchehab@redhat.com> wrote:

> From: Mauro Carvalho Chehab <mchehab@redhat.com>
> Subject: Re: [PATCH 12/21] amd64_edac: add f10-and-later methods-p2
> To: "Borislav Petkov" <borislav.petkov@amd.com>
> Cc: akpm@linux-foundation.org, greg@kroah.com, mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com, dougthompson@xmission.com, linux-kernel@vger.kernel.org
> Date: Monday, May 4, 2009, 5:25 PM
> Borislav Petkov escreveu:
> > +/*
> > + * f10_lookup_addr_in_dct
> > + *
> > + *    Iterate over the DRAM DCT "base"
> and "mask" register looking for
> > + *    a SystemAddr match on the
> specified 'ChannelSelect' and 'NodeID'
> > + *
> > + * Return:
> > + *    -1  NOT FOUND
> > + *    0..csrow = Chip-Select Row
> > + */
> > +static int f10_lookup_addr_in_dct(u32 InputAddr, u32
> NodeID, u32 ChannelSelect)
> > +{
> > +    struct mem_ctl_info *mci;
> > +    struct amd64_pvt *pvt;
> > +    u32 CSBase, CSMask;
> > +    int CSFound = -1;
> > +    int csrow;
> > +
> > +    mci = mci_lookup[NodeID];
> > +    if (!mci)
> > +        return
> CSFound;
> >   
>
> It is better to use a standard error code like -EINVAL
> instead of using -1 for error.
>
>
> Cheers,
> Mauro.
>

good point thanks

doug t

--
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/

\
 
 \ /
  Last update: 2009-05-05 21:31    [W:0.021 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site