mirror of
https://github.com/ipxe/ipxe
synced 2026-02-06 05:14:13 +03:00
[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>
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user