mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +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:
@@ -388,7 +388,7 @@ static size_t bzimage_load_initrd ( struct image *image,
|
||||
user_to_phys ( address, ( offset + initrd->len ) ),
|
||||
( filename ? " " : "" ), ( filename ? filename : "" ) );
|
||||
DBGC2_MD5A ( image, user_to_phys ( address, offset ),
|
||||
user_to_virt ( address, offset ), initrd->len );
|
||||
( address + offset ), initrd->len );
|
||||
}
|
||||
len += initrd->len;
|
||||
|
||||
@@ -427,7 +427,7 @@ static int bzimage_check_initrds ( struct image *image,
|
||||
( initrd->cmdline ? " " : "" ),
|
||||
( initrd->cmdline ? initrd->cmdline : "" ) );
|
||||
DBGC2_MD5A ( image, user_to_phys ( initrd->data, 0 ),
|
||||
user_to_virt ( initrd->data, 0 ), initrd->len );
|
||||
initrd->data, initrd->len );
|
||||
}
|
||||
|
||||
/* Calculate lowest usable address */
|
||||
|
||||
@@ -211,7 +211,7 @@ static void initrd_dump ( void ) {
|
||||
initrd->name, user_to_phys ( initrd->data, 0 ),
|
||||
user_to_phys ( initrd->data, initrd->len ) );
|
||||
DBGC2_MD5A ( &images, user_to_phys ( initrd->data, 0 ),
|
||||
user_to_virt ( initrd->data, 0 ), initrd->len );
|
||||
initrd->data, initrd->len );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,11 +132,6 @@ UACCESS_INLINE ( librm, virt_to_user ) ( volatile const void *addr ) {
|
||||
return trivial_virt_to_user ( addr );
|
||||
}
|
||||
|
||||
static inline __always_inline void *
|
||||
UACCESS_INLINE ( librm, user_to_virt ) ( userptr_t userptr, off_t offset ) {
|
||||
return trivial_user_to_virt ( userptr, offset );
|
||||
}
|
||||
|
||||
static inline __always_inline off_t
|
||||
UACCESS_INLINE ( librm, memchr_user ) ( userptr_t buffer, off_t offset,
|
||||
int c, size_t len ) {
|
||||
|
||||
@@ -431,7 +431,6 @@ void setup_sipi ( unsigned int vector, uint32_t handler,
|
||||
PROVIDE_UACCESS_INLINE ( librm, phys_to_user );
|
||||
PROVIDE_UACCESS_INLINE ( librm, user_to_phys );
|
||||
PROVIDE_UACCESS_INLINE ( librm, virt_to_user );
|
||||
PROVIDE_UACCESS_INLINE ( librm, user_to_virt );
|
||||
PROVIDE_UACCESS_INLINE ( librm, memchr_user );
|
||||
PROVIDE_IOMAP_INLINE ( pages, io_to_bus );
|
||||
PROVIDE_IOMAP ( pages, ioremap, ioremap_pages );
|
||||
|
||||
Reference in New Issue
Block a user