On 07/26/2011 09:36 AM, Aldy Hernandez wrote:

+ bitnum -= bitregion_start;
+ bitregion_end -= bitregion_start;
+ bitregion_start = 0;

Why is this necessary/useful?

You mean, why am I resetting these values (because the call to
get_best_mode() following it needs the adjusted values). Or why am I
adjusting the address to point to the beginning of the region?

I think the adjustment above is intended to match the adjustment of the address by bitregion_start/BITS_PER_UNIT, but the above seems to assume that bitregion_start%BITS_PER_UNIT == 0.

Jason

Reply via email to