]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[uaccess] Remove now-obsolete memchr_user()
authorMichael Brown <mcb30@ipxe.org>
Thu, 24 Apr 2025 15:35:49 +0000 (16:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 24 Apr 2025 15:35:49 +0000 (16:35 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/include/librm.h
src/arch/x86/transitions/librm_mgmt.c
src/core/uaccess.c
src/include/ipxe/linux/linux_uaccess.h
src/include/ipxe/uaccess.h
src/interface/linux/linux_uaccess.c

index 7755abdcfd4657b376f06eebc17d0511e3b62a0f..379b6d8496b256abc9555d941976aa9e95dafe1b 100644 (file)
@@ -131,13 +131,6 @@ UACCESS_INLINE ( librm, virt_to_user ) ( volatile const void *addr ) {
        return trivial_virt_to_user ( addr );
 }
 
-static inline __always_inline off_t
-UACCESS_INLINE ( librm, memchr_user ) ( userptr_t buffer, off_t offset,
-                                       int c, size_t len ) {
-       return trivial_memchr_user ( buffer, offset, c, len );
-}
-
-
 /******************************************************************************
  *
  * Access to variables in .data16 and .text16
index e0679f0fffb7ad13ac67fa461893b7a531c88012..5a6942825c803ab3ba10223376845ad78962ad89 100644 (file)
@@ -431,7 +431,6 @@ void setup_sipi ( unsigned int vector, uint32_t handler,
 PROVIDE_UACCESS_INLINE ( librm, phys_to_virt );
 PROVIDE_UACCESS_INLINE ( librm, virt_to_phys );
 PROVIDE_UACCESS_INLINE ( librm, virt_to_user );
-PROVIDE_UACCESS_INLINE ( librm, memchr_user );
 PROVIDE_IOMAP_INLINE ( pages, io_to_bus );
 PROVIDE_IOMAP ( pages, ioremap, ioremap_pages );
 PROVIDE_IOMAP ( pages, iounmap, iounmap_pages );
index 32bd1ac38561717d2cdc6302d0f673e013080f24..bf922f66d49c4d614f4e620744c8044cebacdda8 100644 (file)
@@ -35,4 +35,3 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
 PROVIDE_UACCESS_INLINE ( flat, phys_to_virt );
 PROVIDE_UACCESS_INLINE ( flat, virt_to_phys );
 PROVIDE_UACCESS_INLINE ( flat, virt_to_user );
-PROVIDE_UACCESS_INLINE ( flat, memchr_user );
index b4f7e2fc69a78bf76a3632ad64fe8592c53af3f3..7d5f5f64266be8d5a49b012bd5cf56603292b823 100644 (file)
@@ -62,10 +62,4 @@ UACCESS_INLINE ( linux, virt_to_user ) ( volatile const void *addr ) {
        return trivial_virt_to_user ( addr );
 }
 
-static inline __always_inline off_t
-UACCESS_INLINE ( linux, memchr_user ) ( userptr_t buffer, off_t offset,
-                                       int c, size_t len ) {
-       return trivial_memchr_user ( buffer, offset, c, len );
-}
-
 #endif /* _IPXE_LINUX_UACCESS_H */
index 62030dd8a4cb0e83aed4be02b4becedfd4289370..d0c6882ed76ec9fe39d2fd9871ebe02cf3e64ed9 100644 (file)
@@ -51,23 +51,6 @@ trivial_virt_to_user ( volatile const void *addr ) {
        return ( ( userptr_t ) addr );
 }
 
-/**
- * Find character in user buffer
- *
- * @v buffer           User buffer
- * @v offset           Starting offset within buffer
- * @v c                        Character to search for
- * @v len              Length of user buffer
- * @ret offset         Offset of character, or <0 if not found
- */
-static inline __always_inline off_t
-trivial_memchr_user ( userptr_t buffer, off_t offset, int c, size_t len ) {
-       void *found;
-
-       found = memchr ( ( ( void * ) buffer + offset ), c, len );
-       return ( found ? ( found - ( void * ) buffer ) : -1 );
-}
-
 /** @} */
 
 /**
@@ -114,12 +97,6 @@ UACCESS_INLINE ( flat, virt_to_user ) ( volatile const void *addr ) {
        return trivial_virt_to_user ( addr );
 }
 
-static inline __always_inline off_t
-UACCESS_INLINE ( flat, memchr_user ) ( userptr_t buffer, off_t offset,
-                                      int c, size_t len ) {
-       return trivial_memchr_user ( buffer, offset, c, len );
-}
-
 /* Include all architecture-independent user access API headers */
 #include <ipxe/linux/linux_uaccess.h>
 
@@ -179,15 +156,4 @@ copy_from_user ( void *dest, userptr_t src, off_t src_off, size_t len ) {
        memcpy ( dest, ( src + src_off ), len );
 }
 
-/**
- * Find character in user buffer
- *
- * @v userptr          User buffer
- * @v offset           Starting offset within buffer
- * @v c                        Character to search for
- * @v len              Length of user buffer
- * @ret offset         Offset of character, or <0 if not found
- */
-off_t memchr_user ( userptr_t userptr, off_t offset, int c, size_t len );
-
 #endif /* _IPXE_UACCESS_H */
index 4fdd8c03a5b3322741b50bc72e9f20bc657747bf..4367077577b1468392f9067f06aee7b2a6f81218 100644 (file)
@@ -30,4 +30,3 @@ FILE_LICENCE(GPL2_OR_LATER);
 PROVIDE_UACCESS_INLINE(linux, phys_to_virt);
 PROVIDE_UACCESS_INLINE(linux, virt_to_phys);
 PROVIDE_UACCESS_INLINE(linux, virt_to_user);
-PROVIDE_UACCESS_INLINE(linux, memchr_user);