On 2018-08-19 14:37, Andy Shevchenko wrote:
> On Sat, Aug 18, 2018 at 4:17 PM Rasmus Villemoes
> <li...@rasmusvillemoes.dk> wrote:
>>
>>  int bitmap_print_to_pagebuf(bool list, char *buf, const unsigned long 
>> *maskp,
>>                             int nmaskbits)
>>  {
>> -       ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf;
>> +       ptrdiff_t len = PAGE_SIZE - ((unsigned long)buf & (PAGE_SIZE-1));
> 
> Don't we have offset_in_page() helper macro?

Indeed, thanks! Andrew, if you pick this up, can you use the much more
obvious

PAGE_SIZE - offset_in_page(buf)

instead? bitmap.c already (unsurprisingly) includes mm.h through some
recursive path.

Rasmus

Reply via email to