summaryrefslogtreecommitdiffstats
path: root/src/interface/linux/linux_sysfs.c
diff options
context:
space:
mode:
authorMichael Brown2025-04-21 01:15:52 +0200
committerMichael Brown2025-04-21 01:15:52 +0200
commit4535548cba255c220719a55d02535e06da82ba47 (patch)
treecc889e117fe18ab14ca45033321e5518b550bf7b /src/interface/linux/linux_sysfs.c
parent[uaccess] Remove redundant memcpy_user() and related string functions (diff)
downloadipxe-4535548cba255c220719a55d02535e06da82ba47.tar.gz
ipxe-4535548cba255c220719a55d02535e06da82ba47.tar.xz
ipxe-4535548cba255c220719a55d02535e06da82ba47.zip
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/linux/linux_sysfs.c')
-rw-r--r--src/interface/linux/linux_sysfs.c3
1 files changed, 1 insertions, 2 deletions
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 ) {