[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B575B68.4030809@kernel.org>
Date: Wed, 20 Jan 2010 11:37:12 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: Christoph Lameter <cl@...ux-foundation.org>
CC: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [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@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists