Messages in this thread | | | Date | Tue, 19 Jan 2010 10:54:29 -0600 (CST) | From | Christoph Lameter <> | Subject | Re: [PATCH 01/37] x86: move range related operation to one file |
| |
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?
Looks quite good. Just add some ornaments describing things to make it clearer.
| |