From 4535548cba255c220719a55d02535e06da82ba47 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 21 Apr 2025 00:15:52 +0100 Subject: [uaccess] Remove redundant user_to_virt() The user_to_virt() function is now a straightforward wrapper around addition, with the addend almost invariably being zero. Remove this redundant wrapper. Signed-off-by: Michael Brown --- src/interface/linux/linux_sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/interface/linux/linux_sysfs.c') diff --git a/src/interface/linux/linux_sysfs.c b/src/interface/linux/linux_sysfs.c index 4f0027cd4..cbb23d81d 100644 --- a/src/interface/linux/linux_sysfs.c +++ b/src/interface/linux/linux_sysfs.c @@ -70,8 +70,7 @@ int linux_sysfs_read ( const char *filename, userptr_t *data ) { *data = tmp; /* Read from file */ - read = linux_read ( fd, user_to_virt ( *data, len ), - LINUX_SYSFS_BLKSIZE ); + read = linux_read ( fd, ( *data + len ), LINUX_SYSFS_BLKSIZE ); if ( read == 0 ) break; if ( read < 0 ) { -- cgit v1.2.3-55-g7522