summaryrefslogtreecommitdiffstats
path: root/src/interface/efi
diff options
context:
space:
mode:
authorMichael Brown2025-04-20 19:29:48 +0200
committerMichael Brown2025-04-21 00:00:13 +0200
commit89fe7886897be76ed902317e311d60ae654057aa (patch)
treeeddd42226c8336226d0a9649d705ccc9f02c88f4 /src/interface/efi
parent[uaccess] Remove redundant userptr_add() and userptr_diff() (diff)
downloadipxe-89fe7886897be76ed902317e311d60ae654057aa.tar.gz
ipxe-89fe7886897be76ed902317e311d60ae654057aa.tar.xz
ipxe-89fe7886897be76ed902317e311d60ae654057aa.zip
[uaccess] Remove redundant memcpy_user() and related string functions
The memcpy_user(), memmove_user(), memcmp_user(), memset_user(), and strlen_user() functions are now just straightforward wrappers around the corresponding standard library functions. Remove these redundant wrappers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi')
-rw-r--r--src/interface/efi/efi_fbcon.c4
-rw-r--r--src/interface/efi/efi_umalloc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/interface/efi/efi_fbcon.c b/src/interface/efi/efi_fbcon.c
index d388e0317..659ebd37e 100644
--- a/src/interface/efi/efi_fbcon.c
+++ b/src/interface/efi/efi_fbcon.c
@@ -124,7 +124,7 @@ static int efifb_draw ( unsigned int character, unsigned int index,
/* Clear existing glyph */
offset = ( index * efifb.font.height );
- memset_user ( efifb.glyphs, offset, 0, efifb.font.height );
+ memset ( ( efifb.glyphs + offset ), 0, efifb.font.height );
/* Get glyph */
blt = NULL;
@@ -296,7 +296,7 @@ static int efifb_glyphs ( void ) {
rc = -ENOMEM;
goto err_alloc;
}
- memset_user ( efifb.glyphs, 0, 0, len );
+ memset ( efifb.glyphs, 0, len );
/* Get font data */
for ( character = 0 ; character < EFIFB_ASCII ; character++ ) {
diff --git a/src/interface/efi/efi_umalloc.c b/src/interface/efi/efi_umalloc.c
index 175ae367e..488c53f3d 100644
--- a/src/interface/efi/efi_umalloc.c
+++ b/src/interface/efi/efi_umalloc.c
@@ -87,8 +87,8 @@ static userptr_t efi_urealloc ( userptr_t old_ptr, size_t new_size ) {
if ( old_ptr && ( old_ptr != UNOWHERE ) ) {
copy_from_user ( &old_size, old_ptr, -EFI_PAGE_SIZE,
sizeof ( old_size ) );
- memcpy_user ( new_ptr, 0, old_ptr, 0,
- ( (old_size < new_size) ? old_size : new_size ));
+ memcpy ( new_ptr, old_ptr,
+ ( (old_size < new_size) ? old_size : new_size ) );
old_pages = ( EFI_SIZE_TO_PAGES ( old_size ) + 1 );
phys_addr = user_to_phys ( old_ptr, -EFI_PAGE_SIZE );
if ( ( efirc = bs->FreePages ( phys_addr, old_pages ) ) != 0 ){