[uaccess] Remove now-obsolete memchr_user()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-04-24 16:35:49 +01:00
parent 4f4f6c33ec
commit 2742ed5d77
6 changed files with 0 additions and 50 deletions

View 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

View 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 );

View 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 );

View 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 */

View 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 */

View 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);