The net/9p networking driver has a handy macro to calculate the amount of bytes from a given pointer to the end of page. Move it to core/mm, and apply tree-wide. No functional changes intended.
This series was originally introduced as a single patch #07/12 in: https://lore.kernel.org/all/[email protected]/ Split it for better granularity and submit separately. Yury Norov (8): mm: add rest_of_page() macro fs: use rest_of_page() macro where appropriate net: use rest_of_page() macro where appropriate core: use rest_of_page() macro where appropriate spi: use rest_of_page() macro where appropriate KVM: use rest_of_page() macro where appropriate drivers: ALSA: use rest_of_page() macro where appropriate arch: use rest_of_page() macro where appropriate arch/arm64/kernel/patching.c | 4 +--- arch/powerpc/lib/code-patching.c | 6 +++--- arch/riscv/kernel/sbi.c | 4 ++-- arch/s390/kvm/gaccess.c | 6 +++--- arch/x86/kvm/emulate.c | 4 ++-- drivers/block/null_blk/main.c | 6 ++---- drivers/gpu/drm/i915/gt/shmem_utils.c | 5 ++--- drivers/md/dm-pcache/backing_dev.h | 2 +- drivers/net/ethernet/meta/fbnic/fbnic_tlv.c | 6 +++--- drivers/s390/net/qeth_core_main.c | 6 ++---- drivers/spi/spi-pl022.c | 3 +-- drivers/spi/spi.c | 4 +--- fs/ext4/verity.c | 3 +-- fs/f2fs/verity.c | 6 ++---- fs/fuse/dev.c | 4 ++-- fs/iomap/buffered-io.c | 2 +- fs/nfs/pagelist.c | 2 +- fs/remap_range.c | 3 +-- fs/xfs/scrub/xfile.c | 3 +-- include/crypto/scatterwalk.h | 2 +- include/linux/highmem.h | 24 +++++++++------------ include/linux/iomap.h | 2 +- include/linux/iov_iter.h | 3 +-- include/linux/mm.h | 2 ++ kernel/events/ring_buffer.c | 2 +- lib/bitmap-str.c | 2 +- lib/iov_iter.c | 5 ++--- net/9p/trans_virtio.c | 6 ------ sound/virtio/virtio_pcm_msg.c | 4 ++-- 29 files changed, 53 insertions(+), 78 deletions(-) -- 2.43.0
