> >> static uint32_t addr_to_wpnum(uint64_t addr) {
> >>     return addr>>  (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT);
> >> }
> > 
> > This implicitly limits max address to 0xFFFFFFFF << (HWBLOCK_SHIFT +
> > SECTOR_SHIFT + WPGROUP_SHIFT), have you done this on purpose?
> 
> You could argue for uint64_t return type, but we have to pass
> the result to the bitmap functions anyway, so there is implicitly
> a limit. I don't think it's a particularly severe one.

Isn't the correct answer the same type as the bitmap code uses for bit 
numbers?  By my reading this is "int".

Paul

Reply via email to