lkml.org 
[lkml]   [2010]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 01/37] x86: move range related operation to one file
    On 01/19/2010 08:54 AM, Christoph Lameter wrote:
    >
    > On Fri, 15 Jan 2010, Yinghai Lu wrote:
    >
    > <need more text here describing f.e. how you changed the API and merged
    > some functions doing similar work>
    >
    >> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    >
    >> -
    >> -static int __init cmp_range(const void *x1, const void *x2)
    >> -{
    >> - const struct res_range *r1 = x1;
    >> - const struct res_range *r2 = x2;
    >> - long start1, start2;
    >> -
    >> - start1 = r1->start;
    >> - start2 = r2->start;
    >> -
    >> - return start1 - start2;
    >> -}
    >
    >
    > Function is passed to sort() should not be used directly. Maybe add
    > comments.
    >
    >> - static struct res_range range_new[RANGE_NUM];
    >> + static struct range range_new[RANGE_NUM];
    >
    > Renaming res_range -> range. Good but explain.
    >
    >> - nr_range = add_range_with_merge(range, nr_range, 0,
    >> + nr_range = add_range_with_merge(range, RANGE_NUM, nr_range, 0,
    >> (1ULL<<(20 - PAGE_SHIFT)) - 1);
    >
    > add_range_with_merge semantics changed. Explain.
    >
    >> update_res(info, start, end, IORESOURCE_IO, 1);
    >> - update_range(range, start, end);
    >> + subtract_range(range, RANGE_NUM, start, end);
    >
    > Two functions merged?
    >
    >> +void subtract_range(struct range *range, int az, u64 start, u64 end)
    >
    > Subtract range can now do what update_range did? How so?

    update_range was introduced at first. and actually it did sth like subtract range.

    and subtract range is more accurate.

    Yinghai


    \
     
     \ /
      Last update: 2010-01-20 20:41    [W:0.023 / U:29.388 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site