[uaccess] Remove redundant copy_from_user() and copy_to_user()

Remove the now-redundant copy_from_user() and copy_to_user() wrapper
functions.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-04-30 15:18:34 +01:00
parent a69c42dd9f
commit b6f9e4bab0
89 changed files with 90 additions and 28 deletions
+2
View File
@@ -13,6 +13,8 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <string.h>
#define DUMMY_INX( _prefix, _suffix, _type ) \
static inline __always_inline _type \
IOAPI_INLINE ( _prefix, in ## _suffix ) ( volatile _type *io_addr __unused) { \
+2
View File
@@ -9,6 +9,8 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stddef.h>
#ifdef IOMAP_VIRT
#define IOMAP_PREFIX_virt
#else
-27
View File
@@ -11,7 +11,6 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h>
#include <string.h>
#include <ipxe/api.h>
#include <config/ioapi.h>
@@ -127,30 +126,4 @@ virt_to_phys ( volatile const void *virt );
*/
void * __attribute__ (( const )) phys_to_virt ( physaddr_t phys );
/**
* Copy data to user buffer
*
* @v dest Destination
* @v dest_off Destination offset
* @v src Source
* @v len Length
*/
static inline __always_inline void
copy_to_user ( userptr_t dest, off_t dest_off, const void *src, size_t len ) {
memcpy ( ( dest + dest_off ), src, len );
}
/**
* Copy data from user buffer
*
* @v dest Destination
* @v src Source
* @v src_off Source offset
* @v len Length
*/
static inline __always_inline void
copy_from_user ( void *dest, userptr_t src, off_t src_off, size_t len ) {
memcpy ( dest, ( src + src_off ), len );
}
#endif /* _IPXE_UACCESS_H */