[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:
Michael Brown
2025-04-21 00:15:52 +01:00
parent 89fe788689
commit 4535548cba
14 changed files with 15 additions and 60 deletions

View File

@@ -245,8 +245,8 @@ static int efi_image_exec ( struct image *image ) {
/* Attempt loading image */
handle = NULL;
if ( ( efirc = bs->LoadImage ( FALSE, efi_image_handle, path,
user_to_virt ( exec->data, 0 ),
exec->len, &handle ) ) != 0 ) {
exec->data, exec->len,
&handle ) ) != 0 ) {
/* Not an EFI image */
rc = -EEFI_LOAD ( efirc );
DBGC ( image, "EFIIMAGE %s could not load: %s\n",
@@ -379,8 +379,8 @@ static int efi_image_probe ( struct image *image ) {
/* Attempt loading image */
handle = NULL;
if ( ( efirc = bs->LoadImage ( FALSE, efi_image_handle, &empty_path,
user_to_virt ( image->data, 0 ),
image->len, &handle ) ) != 0 ) {
image->data, image->len,
&handle ) ) != 0 ) {
/* Not an EFI image */
rc = -EEFI_LOAD ( efirc );
DBGC ( image, "EFIIMAGE %s could not load: %s\n",