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.
That was intentional. bitregion_start always falls on a byte boundary, does it not?
struct {
stuff;
unsigned int b:3;
unsigned int other_bits:22;
other_stuff;
}
Does not "b" always start at a byte boundary?
