lkml.org 
[lkml]   [2019]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v2 06/24] EDAC: Kill EDAC_DIMM_PTR() macro
    Date
    On 13.08.19 16:59:47, Borislav Petkov wrote:
    > > + *
    > > + * For 2 layers, this macro is similar to allocate a bi-dimensional array
    > > + * and to return "dimms[layer0][layer1]";
    > > + *
    > > + * For 3 layers, this macro is similar to allocate a tri-dimensional array
    > > + * and to return "dimms[layer0][layer1][layer2]";
    > > + */
    > > +static inline struct dimm_info *
    > > +edac_get_dimm(struct mem_ctl_info *mci, int layer0, int layer1, int layer2)
    > > +{
    > > + int index = layer0;
    > > +
    > > + if (index >= 0 && mci->n_layers > 1)
    >
    > Can layer0 be negative here to warrant that check?

    Yes, if a mem controller can not determine a dimm's position, this
    function can be called with layers set to -1.

    I have reworked the patch according to all of your comments.

    Thanks for review,

    -Robert

    \
     
     \ /
      Last update: 2019-08-27 14:20    [W:2.446 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site