diff options
author | Jamal Shareef <jamal.k.shareef@gmail.com> | 2019-11-01 17:04:14 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-02 11:36:02 +0100 |
commit | 8823d99080ba59598f00b7e50b281c46ddd39d56 (patch) | |
tree | 5888a44fce1499078853f409f71be6c5280d8719 /drivers/staging/vc04_services/interface | |
parent | dc7603e1fa3dd30ad9aa1489dbd84ee84c554e8f (diff) |
staging: vc04_services: Remove enum typedefs in vchi
Remove enum typedefs from header files and files which include them
in vchi. Issue found by checkpatch.
Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
Link: https://lore.kernel.org/r/4afc7d28ef9ad249cac3bf7c3dd453bb64b13657.1572652827.git.jamal.k.shareef@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface')
3 files changed, 41 insertions, 47 deletions
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 0a353a468f34..75b1ab4919e3 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -105,8 +105,8 @@ extern int32_t vchi_service_release(const VCHI_SERVICE_HANDLE_T handle); // Routine to set a control option for a named service extern int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle, - VCHI_SERVICE_OPTION_T option, - int value); + enum vchi_service_option option, + int value); /* Routine to send a message from kernel memory across a service */ extern int @@ -126,7 +126,7 @@ extern int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, void *data, uint32_t max_data_size_to_read, uint32_t *actual_msg_size, - VCHI_FLAGS_T flags); + enum vchi_flags flags); // Routine to look at a message in place. // The message is not dequeued, so a subsequent call to peek or dequeue @@ -134,7 +134,7 @@ extern int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, extern int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle, void **data, uint32_t *msg_size, - VCHI_FLAGS_T flags); + enum vchi_flags flags); // Routine to remove a message after it has been read in place with peek // The first message on the queue is dequeued. @@ -146,13 +146,13 @@ extern int32_t vchi_msg_remove(VCHI_SERVICE_HANDLE_T handle); extern int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, void **data, // } may be NULL, as info can be uint32_t *msg_size, // } obtained from HELD_MSG_T - VCHI_FLAGS_T flags, + enum vchi_flags flags, struct vchi_held_msg *message_descriptor); // Initialise an iterator to look through messages in place extern int32_t vchi_msg_look_ahead(VCHI_SERVICE_HANDLE_T handle, struct vchi_msg_iter *iter, - VCHI_FLAGS_T flags); + enum vchi_flags flags); /******************************************************************************* * Global service support API - operations on held messages @@ -205,21 +205,21 @@ extern int32_t vchi_msg_iter_hold_next(struct vchi_msg_iter *iter, extern int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, void *data_dst, uint32_t data_size, - VCHI_FLAGS_T flags, + enum vchi_flags flags, void *transfer_handle); // Prepare interface for a transfer from the other side into relocatable memory. int32_t vchi_bulk_queue_receive_reloc(const VCHI_SERVICE_HANDLE_T handle, uint32_t offset, uint32_t data_size, - const VCHI_FLAGS_T flags, + const enum vchi_flags flags, void * const bulk_handle); // Routine to queue up data ready for transfer to the other (once they have signalled they are ready) extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, const void *data_src, uint32_t data_size, - VCHI_FLAGS_T flags, + enum vchi_flags flags, void *transfer_handle); /****************************************************************************** @@ -233,7 +233,7 @@ extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, extern int32_t vchi_bulk_queue_transmit_reloc(VCHI_SERVICE_HANDLE_T handle, uint32_t offset, uint32_t data_size, - VCHI_FLAGS_T flags, + enum vchi_flags flags, void *transfer_handle); #endif /* VCHI_H_ */ diff --git a/drivers/staging/vc04_services/interface/vchi/vchi_common.h b/drivers/staging/vc04_services/interface/vchi/vchi_common.h index 1fdbe038500a..c99735fc0308 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi_common.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi_common.h @@ -5,7 +5,7 @@ #define VCHI_COMMON_H_ //flags used when sending messages (must be bitmapped) -typedef enum { +enum vchi_flags { VCHI_FLAGS_NONE = 0x0, VCHI_FLAGS_BLOCK_UNTIL_OP_COMPLETE = 0x1, // waits for message to be received, or sent (NB. not the same as being seen on other side) VCHI_FLAGS_CALLBACK_WHEN_OP_COMPLETE = 0x2, // run a callback when message sent @@ -20,17 +20,17 @@ typedef enum { VCHI_FLAGS_BULK_DATA_QUEUED = 0x040000, // internal use only VCHI_FLAGS_BULK_DATA_COMPLETE = 0x080000, // internal use only VCHI_FLAGS_INTERNAL = 0xFF0000 -} VCHI_FLAGS_T; +}; // constants for vchi_crc_control() -typedef enum { +enum vchi_crc_control { VCHI_CRC_NOTHING = -1, VCHI_CRC_PER_SERVICE = 0, VCHI_CRC_EVERYTHING = 1, -} VCHI_CRC_CONTROL_T; +}; //callback reasons when an event occurs on a service -typedef enum { +enum vchi_callback_reason { VCHI_CALLBACK_REASON_MIN, //This indicates that there is data available @@ -73,21 +73,21 @@ typedef enum { VCHI_CALLBACK_BULK_TRANSMIT_ABORTED, VCHI_CALLBACK_REASON_MAX -} VCHI_CALLBACK_REASON_T; +}; // service control options -typedef enum { +enum vchi_service_option { VCHI_SERVICE_OPTION_MIN, VCHI_SERVICE_OPTION_TRACE, VCHI_SERVICE_OPTION_SYNCHRONOUS, VCHI_SERVICE_OPTION_MAX -} VCHI_SERVICE_OPTION_T; +}; //Callback used by all services / bulk transfers typedef void (*VCHI_CALLBACK_T)(void *callback_param, //my service local param - VCHI_CALLBACK_REASON_T reason, + enum vchi_callback_reason reason, void *handle); //for transmitting msg's only /* 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 5e26f0abd5ee..704afd470c88 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -27,7 +27,7 @@ struct shim_service { * void **data, * uint32_t *msg_size, - * VCHI_FLAGS_T flags + * enum vchi_flags flags * * Description: Routine to return a pointer to the current message (to allow in * place processing). The message can be removed using @@ -37,9 +37,9 @@ struct shim_service { * ***********************************************************/ int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle, - void **data, - uint32_t *msg_size, - VCHI_FLAGS_T flags) + void **data, + uint32_t *msg_size, + enum vchi_flags flags) { struct shim_service *service = (struct shim_service *)handle; struct vchiq_header *header; @@ -190,7 +190,7 @@ EXPORT_SYMBOL(vchi_queue_user_message); * Arguments: VCHI_BULK_HANDLE_T handle, * void *data_dst, * const uint32_t data_size, - * VCHI_FLAGS_T flags + * enum vchi_flags flags * void *bulk_handle * * Description: Routine to setup a rcv buffer @@ -198,11 +198,9 @@ EXPORT_SYMBOL(vchi_queue_user_message); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, - void *data_dst, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *bulk_handle) +int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, void *data_dst, + uint32_t data_size, enum vchi_flags flags, + void *bulk_handle) { struct shim_service *service = (struct shim_service *)handle; VCHIQ_BULK_MODE_T mode; @@ -250,7 +248,7 @@ EXPORT_SYMBOL(vchi_bulk_queue_receive); * Arguments: VCHI_BULK_HANDLE_T handle, * const void *data_src, * uint32_t data_size, - * VCHI_FLAGS_T flags, + * enum vchi_flags flags, * void *bulk_handle * * Description: Routine to transmit some data @@ -259,10 +257,10 @@ EXPORT_SYMBOL(vchi_bulk_queue_receive); * ***********************************************************/ int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, - const void *data_src, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *bulk_handle) + const void *data_src, + uint32_t data_size, + enum vchi_flags flags, + void *bulk_handle) { struct shim_service *service = (struct shim_service *)handle; VCHIQ_BULK_MODE_T mode; @@ -313,18 +311,16 @@ EXPORT_SYMBOL(vchi_bulk_queue_transmit); * void *data, * uint32_t max_data_size_to_read, * uint32_t *actual_msg_size - * VCHI_FLAGS_T flags + * enum vchi_flags flags * * Description: Routine to dequeue a message into the supplied buffer * * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, - void *data, - uint32_t max_data_size_to_read, - uint32_t *actual_msg_size, - VCHI_FLAGS_T flags) +int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, void *data, + uint32_t max_data_size_to_read, + uint32_t *actual_msg_size, enum vchi_flags flags) { struct shim_service *service = (struct shim_service *)handle; struct vchiq_header *header; @@ -383,7 +379,7 @@ EXPORT_SYMBOL(vchi_held_msg_release); * Arguments: VCHI_SERVICE_HANDLE_T handle, * void **data, * uint32_t *msg_size, - * VCHI_FLAGS_T flags, + * enum vchi_flags flags, * struct vchi_held_msg *message_handle * * Description: Routine to return a pointer to the current message (to allow @@ -394,11 +390,9 @@ EXPORT_SYMBOL(vchi_held_msg_release); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, - void **data, - uint32_t *msg_size, - VCHI_FLAGS_T flags, - struct vchi_held_msg *message_handle) +int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, void **data, + uint32_t *msg_size, enum vchi_flags flags, + struct vchi_held_msg *message_handle) { struct shim_service *service = (struct shim_service *)handle; struct vchiq_header *header; @@ -668,7 +662,7 @@ int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle) EXPORT_SYMBOL(vchi_service_destroy); int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle, - VCHI_SERVICE_OPTION_T option, + enum vchi_service_option option, int value) { int32_t ret = -1; |