On Mon, Jun 14, 2021 at 11:04:53AM +0100, David Howells wrote: > (btw, can offset_in_thp() have it's second arg renamed to 'pos', not just 'p'? > 'p' is normally used to indicate a pointer of some sort). the argument is sometimes a pointer. for example: arch/arm64/kernel/mte.c: offset = offset_in_page(addr); fs/jbd2/commit.c: (void *)(addr + offset_in_page(bh->b_data)), bh->b_size); yes, those are offset_in_page(), not offset_in_thp(), but i'll bet you a cadbury's creme egg that we find someone who needs to use offset_in_thp() (or offset_in_folio()) on a pointer within three years.