mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
staging: vchi: Get rid of vchiq_status_to_vchi()
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@suse.de> Link: https://lore.kernel.org/r/20200527115400.31391-7-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f7f0ecfbef
commit
1755d10000
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user