[uaccess] Remove redundant userptr_add() and userptr_diff()

The userptr_add() and userptr_diff() functions are now just
straightforward wrappers around addition and subtraction.

Remove these redundant wrappers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-04-20 18:45:55 +01:00
parent b65f67d443
commit ef03849185
13 changed files with 27 additions and 108 deletions

View File

@@ -625,7 +625,7 @@ static int sandev_rw ( struct san_device *sandev, uint64_t lba,
/* Move to next fragment */
frag_len = ( sandev->capacity.blksize * params.rw.count );
params.rw.buffer = userptr_add ( params.rw.buffer, frag_len );
params.rw.buffer += frag_len;
params.rw.lba += params.rw.count;
remaining -= params.rw.count;
}

View File

@@ -36,7 +36,6 @@ PROVIDE_UACCESS_INLINE ( flat, phys_to_user );
PROVIDE_UACCESS_INLINE ( flat, user_to_phys );
PROVIDE_UACCESS_INLINE ( flat, virt_to_user );
PROVIDE_UACCESS_INLINE ( flat, user_to_virt );
PROVIDE_UACCESS_INLINE ( flat, userptr_add );
PROVIDE_UACCESS_INLINE ( flat, memcpy_user );
PROVIDE_UACCESS_INLINE ( flat, memmove_user );
PROVIDE_UACCESS_INLINE ( flat, memset_user );