vchiq functions return an enum and vchi's ints. Those are compatible, no need to explicitly cast them. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx> --- .../interface/vchiq_arm/vchiq_shim.c | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c index 429b0c71e455..0fc5fa05c6c2 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -9,8 +9,6 @@ #include "vchiq_util.h" -#define vchiq_status_to_vchi(status) ((int32_t)status) - struct shim_service { unsigned int handle; @@ -105,7 +103,7 @@ int vchi_queue_kernel_message(struct vchi_service_handle *handle, void *data, msleep(1); } - return vchiq_status_to_vchi(status); + return status; } EXPORT_SYMBOL(vchi_queue_kernel_message); @@ -146,7 +144,7 @@ int32_t vchi_bulk_queue_receive(struct vchi_service_handle *handle, void *data_d break; default: WARN(1, "unsupported message\n"); - return vchiq_status_to_vchi(VCHIQ_ERROR); + return VCHIQ_ERROR; } while (1) { @@ -163,7 +161,7 @@ int32_t vchi_bulk_queue_receive(struct vchi_service_handle *handle, void *data_d msleep(1); } - return vchiq_status_to_vchi(status); + return status; } EXPORT_SYMBOL(vchi_bulk_queue_receive); @@ -207,7 +205,7 @@ int32_t vchi_bulk_queue_transmit(struct vchi_service_handle *handle, break; default: WARN(1, "unsupported message\n"); - return vchiq_status_to_vchi(VCHIQ_ERROR); + return VCHIQ_ERROR; } while (1) { @@ -225,7 +223,7 @@ int32_t vchi_bulk_queue_transmit(struct vchi_service_handle *handle, msleep(1); } - return vchiq_status_to_vchi(status); + return status; } EXPORT_SYMBOL(vchi_bulk_queue_transmit); @@ -372,7 +370,7 @@ int32_t vchi_initialise(struct vchi_instance_handle **instance_handle) *instance_handle = (struct vchi_instance_handle *)instance; - return vchiq_status_to_vchi(status); + return status; } EXPORT_SYMBOL(vchi_initialise); @@ -410,7 +408,7 @@ int32_t vchi_disconnect(struct vchi_instance_handle *instance_handle) { struct vchiq_instance *instance = (struct vchiq_instance *)instance_handle; - return vchiq_status_to_vchi(vchiq_shutdown(instance)); + return vchiq_shutdown(instance); } EXPORT_SYMBOL(vchi_disconnect); @@ -561,7 +559,7 @@ int32_t vchi_service_close(const struct vchi_service_handle *handle) if (status == VCHIQ_SUCCESS) service_free(service); - ret = vchiq_status_to_vchi(status); + ret = status; } return ret; } @@ -576,7 +574,7 @@ int32_t vchi_get_peer_version(const struct vchi_service_handle *handle, short *p enum vchiq_status status; status = vchiq_get_peer_version(service->handle, peer_version); - ret = vchiq_status_to_vchi(status); + ret = status; } return ret; } @@ -598,7 +596,7 @@ int32_t vchi_service_use(const struct vchi_service_handle *handle) struct shim_service *service = (struct shim_service *)handle; if (service) - ret = vchiq_status_to_vchi(vchiq_use_service(service->handle)); + ret = vchiq_use_service(service->handle); return ret; } EXPORT_SYMBOL(vchi_service_use); @@ -619,8 +617,7 @@ int32_t vchi_service_release(const struct vchi_service_handle *handle) struct shim_service *service = (struct shim_service *)handle; if (service) - ret = vchiq_status_to_vchi( - vchiq_release_service(service->handle)); + ret = vchiq_release_service(service->handle); return ret; } EXPORT_SYMBOL(vchi_service_release); -- 2.26.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel