From 49bec49fd7f273ec114e2e533c1bb8f21a654aaf Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 30 Oct 2016 05:55:07 -0700 Subject: staging: vc04_services: remove vchiq_copy_from_user The vchiq_copy_from_user function is not portable and is consider "bad practice." Replace this function with a callback based mechanism that is passed downward on the stack. When it is actually time to copy the data, the callback is called to copy the data into the message. This callback is provided internally for userland calls through ioctls on the device. NOTE: Internal clients will need to be modified to work with the new internal API. Test Run: vchiq_test -p 1 vchiq_test -f 10 Both tests pass. Internal API Changes: Change vchi_msg_queue to: int32_t vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, ssize_t (*copy_callback)(void *context, void *dest, size_t offset, size_t maxsize), void *context, uint32_t data_size ); Remove: vchi_msg_queuev_ex vchi_msg_queuev These functions were not implemented anyway so no need to fix them. It's easier to just remove them. Signed-off-by: Michael Zoran Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h') diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 1c2b1b5b8cc9..9e164652548a 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -634,9 +634,6 @@ vchiq_transfer_bulk(VCHIQ_BULK_T *bulk); extern void vchiq_complete_bulk(VCHIQ_BULK_T *bulk); -extern VCHIQ_STATUS_T -vchiq_copy_from_user(void *dst, const void *src, int size); - extern void remote_event_signal(REMOTE_EVENT_T *event); -- cgit v1.2.3