From 63d27c6311db07780dfd7a0bd939c96b60e20a7c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 20 Apr 2025 17:18:06 +0100 Subject: [uaccess] Rename userptr_sub() to userptr_diff() Clarify the intended usage of userptr_sub() by renaming it to userptr_diff() (to avoid confusion with userptr_add()), and fix the existing call sites that erroneously use userptr_sub() to subtract an offset from a userptr_t value. Signed-off-by: Michael Brown --- src/include/ipxe/linux/linux_uaccess.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include/ipxe/linux/linux_uaccess.h') diff --git a/src/include/ipxe/linux/linux_uaccess.h b/src/include/ipxe/linux/linux_uaccess.h index a642b6163..b29aa14bd 100644 --- a/src/include/ipxe/linux/linux_uaccess.h +++ b/src/include/ipxe/linux/linux_uaccess.h @@ -75,9 +75,9 @@ UACCESS_INLINE ( linux, userptr_add ) ( userptr_t userptr, off_t offset ) { } static inline __always_inline off_t -UACCESS_INLINE ( linux, userptr_sub ) ( userptr_t userptr, - userptr_t subtrahend ) { - return trivial_userptr_sub ( userptr, subtrahend ); +UACCESS_INLINE ( linux, userptr_diff ) ( userptr_t userptr, + userptr_t subtrahend ) { + return trivial_userptr_diff ( userptr, subtrahend ); } static inline __always_inline void -- cgit v1.2.3-55-g7522