mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 14:43:54 +08:00
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>
This commit is contained in:
parent
dc7603e1fa
commit
8823d99080
@ -90,7 +90,7 @@ static int bcm2835_audio_send_simple(struct bcm2835_audio_instance *instance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void audio_vchi_callback(void *param,
|
static void audio_vchi_callback(void *param,
|
||||||
const VCHI_CALLBACK_REASON_T reason,
|
const enum vchi_callback_reason reason,
|
||||||
void *msg_handle)
|
void *msg_handle)
|
||||||
{
|
{
|
||||||
struct bcm2835_audio_instance *instance = param;
|
struct bcm2835_audio_instance *instance = param;
|
||||||
|
@ -535,7 +535,7 @@ static void bulk_abort_cb(struct vchiq_mmal_instance *instance,
|
|||||||
|
|
||||||
/* incoming event service callback */
|
/* incoming event service callback */
|
||||||
static void service_callback(void *param,
|
static void service_callback(void *param,
|
||||||
const VCHI_CALLBACK_REASON_T reason,
|
const enum vchi_callback_reason reason,
|
||||||
void *bulk_ctx)
|
void *bulk_ctx)
|
||||||
{
|
{
|
||||||
struct vchiq_mmal_instance *instance = param;
|
struct vchiq_mmal_instance *instance = param;
|
||||||
|
@ -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
|
// Routine to set a control option for a named service
|
||||||
extern int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle,
|
extern int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle,
|
||||||
VCHI_SERVICE_OPTION_T option,
|
enum vchi_service_option option,
|
||||||
int value);
|
int value);
|
||||||
|
|
||||||
/* Routine to send a message from kernel memory across a service */
|
/* Routine to send a message from kernel memory across a service */
|
||||||
extern int
|
extern int
|
||||||
@ -126,7 +126,7 @@ extern int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle,
|
|||||||
void *data,
|
void *data,
|
||||||
uint32_t max_data_size_to_read,
|
uint32_t max_data_size_to_read,
|
||||||
uint32_t *actual_msg_size,
|
uint32_t *actual_msg_size,
|
||||||
VCHI_FLAGS_T flags);
|
enum vchi_flags flags);
|
||||||
|
|
||||||
// Routine to look at a message in place.
|
// Routine to look at a message in place.
|
||||||
// The message is not dequeued, so a subsequent call to peek or dequeue
|
// 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,
|
extern int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle,
|
||||||
void **data,
|
void **data,
|
||||||
uint32_t *msg_size,
|
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
|
// Routine to remove a message after it has been read in place with peek
|
||||||
// The first message on the queue is dequeued.
|
// 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,
|
extern int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle,
|
||||||
void **data, // } may be NULL, as info can be
|
void **data, // } may be NULL, as info can be
|
||||||
uint32_t *msg_size, // } obtained from HELD_MSG_T
|
uint32_t *msg_size, // } obtained from HELD_MSG_T
|
||||||
VCHI_FLAGS_T flags,
|
enum vchi_flags flags,
|
||||||
struct vchi_held_msg *message_descriptor);
|
struct vchi_held_msg *message_descriptor);
|
||||||
|
|
||||||
// Initialise an iterator to look through messages in place
|
// Initialise an iterator to look through messages in place
|
||||||
extern int32_t vchi_msg_look_ahead(VCHI_SERVICE_HANDLE_T handle,
|
extern int32_t vchi_msg_look_ahead(VCHI_SERVICE_HANDLE_T handle,
|
||||||
struct vchi_msg_iter *iter,
|
struct vchi_msg_iter *iter,
|
||||||
VCHI_FLAGS_T flags);
|
enum vchi_flags flags);
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Global service support API - operations on held messages
|
* 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,
|
extern int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle,
|
||||||
void *data_dst,
|
void *data_dst,
|
||||||
uint32_t data_size,
|
uint32_t data_size,
|
||||||
VCHI_FLAGS_T flags,
|
enum vchi_flags flags,
|
||||||
void *transfer_handle);
|
void *transfer_handle);
|
||||||
|
|
||||||
// Prepare interface for a transfer from the other side into relocatable memory.
|
// 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,
|
int32_t vchi_bulk_queue_receive_reloc(const VCHI_SERVICE_HANDLE_T handle,
|
||||||
uint32_t offset,
|
uint32_t offset,
|
||||||
uint32_t data_size,
|
uint32_t data_size,
|
||||||
const VCHI_FLAGS_T flags,
|
const enum vchi_flags flags,
|
||||||
void * const bulk_handle);
|
void * const bulk_handle);
|
||||||
|
|
||||||
// Routine to queue up data ready for transfer to the other (once they have signalled they are ready)
|
// 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,
|
extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle,
|
||||||
const void *data_src,
|
const void *data_src,
|
||||||
uint32_t data_size,
|
uint32_t data_size,
|
||||||
VCHI_FLAGS_T flags,
|
enum vchi_flags flags,
|
||||||
void *transfer_handle);
|
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,
|
extern int32_t vchi_bulk_queue_transmit_reloc(VCHI_SERVICE_HANDLE_T handle,
|
||||||
uint32_t offset,
|
uint32_t offset,
|
||||||
uint32_t data_size,
|
uint32_t data_size,
|
||||||
VCHI_FLAGS_T flags,
|
enum vchi_flags flags,
|
||||||
void *transfer_handle);
|
void *transfer_handle);
|
||||||
#endif /* VCHI_H_ */
|
#endif /* VCHI_H_ */
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#define VCHI_COMMON_H_
|
#define VCHI_COMMON_H_
|
||||||
|
|
||||||
//flags used when sending messages (must be bitmapped)
|
//flags used when sending messages (must be bitmapped)
|
||||||
typedef enum {
|
enum vchi_flags {
|
||||||
VCHI_FLAGS_NONE = 0x0,
|
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_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
|
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_QUEUED = 0x040000, // internal use only
|
||||||
VCHI_FLAGS_BULK_DATA_COMPLETE = 0x080000, // internal use only
|
VCHI_FLAGS_BULK_DATA_COMPLETE = 0x080000, // internal use only
|
||||||
VCHI_FLAGS_INTERNAL = 0xFF0000
|
VCHI_FLAGS_INTERNAL = 0xFF0000
|
||||||
} VCHI_FLAGS_T;
|
};
|
||||||
|
|
||||||
// constants for vchi_crc_control()
|
// constants for vchi_crc_control()
|
||||||
typedef enum {
|
enum vchi_crc_control {
|
||||||
VCHI_CRC_NOTHING = -1,
|
VCHI_CRC_NOTHING = -1,
|
||||||
VCHI_CRC_PER_SERVICE = 0,
|
VCHI_CRC_PER_SERVICE = 0,
|
||||||
VCHI_CRC_EVERYTHING = 1,
|
VCHI_CRC_EVERYTHING = 1,
|
||||||
} VCHI_CRC_CONTROL_T;
|
};
|
||||||
|
|
||||||
//callback reasons when an event occurs on a service
|
//callback reasons when an event occurs on a service
|
||||||
typedef enum {
|
enum vchi_callback_reason {
|
||||||
VCHI_CALLBACK_REASON_MIN,
|
VCHI_CALLBACK_REASON_MIN,
|
||||||
|
|
||||||
//This indicates that there is data available
|
//This indicates that there is data available
|
||||||
@ -73,21 +73,21 @@ typedef enum {
|
|||||||
VCHI_CALLBACK_BULK_TRANSMIT_ABORTED,
|
VCHI_CALLBACK_BULK_TRANSMIT_ABORTED,
|
||||||
|
|
||||||
VCHI_CALLBACK_REASON_MAX
|
VCHI_CALLBACK_REASON_MAX
|
||||||
} VCHI_CALLBACK_REASON_T;
|
};
|
||||||
|
|
||||||
// service control options
|
// service control options
|
||||||
typedef enum {
|
enum vchi_service_option {
|
||||||
VCHI_SERVICE_OPTION_MIN,
|
VCHI_SERVICE_OPTION_MIN,
|
||||||
|
|
||||||
VCHI_SERVICE_OPTION_TRACE,
|
VCHI_SERVICE_OPTION_TRACE,
|
||||||
VCHI_SERVICE_OPTION_SYNCHRONOUS,
|
VCHI_SERVICE_OPTION_SYNCHRONOUS,
|
||||||
|
|
||||||
VCHI_SERVICE_OPTION_MAX
|
VCHI_SERVICE_OPTION_MAX
|
||||||
} VCHI_SERVICE_OPTION_T;
|
};
|
||||||
|
|
||||||
//Callback used by all services / bulk transfers
|
//Callback used by all services / bulk transfers
|
||||||
typedef void (*VCHI_CALLBACK_T)(void *callback_param, //my service local param
|
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
|
void *handle); //for transmitting msg's only
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -27,7 +27,7 @@ struct shim_service {
|
|||||||
* void **data,
|
* void **data,
|
||||||
* uint32_t *msg_size,
|
* 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
|
* Description: Routine to return a pointer to the current message (to allow in
|
||||||
* place processing). The message can be removed using
|
* 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,
|
int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle,
|
||||||
void **data,
|
void **data,
|
||||||
uint32_t *msg_size,
|
uint32_t *msg_size,
|
||||||
VCHI_FLAGS_T flags)
|
enum vchi_flags flags)
|
||||||
{
|
{
|
||||||
struct shim_service *service = (struct shim_service *)handle;
|
struct shim_service *service = (struct shim_service *)handle;
|
||||||
struct vchiq_header *header;
|
struct vchiq_header *header;
|
||||||
@ -190,7 +190,7 @@ EXPORT_SYMBOL(vchi_queue_user_message);
|
|||||||
* Arguments: VCHI_BULK_HANDLE_T handle,
|
* Arguments: VCHI_BULK_HANDLE_T handle,
|
||||||
* void *data_dst,
|
* void *data_dst,
|
||||||
* const uint32_t data_size,
|
* const uint32_t data_size,
|
||||||
* VCHI_FLAGS_T flags
|
* enum vchi_flags flags
|
||||||
* void *bulk_handle
|
* void *bulk_handle
|
||||||
*
|
*
|
||||||
* Description: Routine to setup a rcv buffer
|
* Description: Routine to setup a rcv buffer
|
||||||
@ -198,11 +198,9 @@ EXPORT_SYMBOL(vchi_queue_user_message);
|
|||||||
* Returns: int32_t - success == 0
|
* Returns: int32_t - success == 0
|
||||||
*
|
*
|
||||||
***********************************************************/
|
***********************************************************/
|
||||||
int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle,
|
int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, void *data_dst,
|
||||||
void *data_dst,
|
uint32_t data_size, enum vchi_flags flags,
|
||||||
uint32_t data_size,
|
void *bulk_handle)
|
||||||
VCHI_FLAGS_T flags,
|
|
||||||
void *bulk_handle)
|
|
||||||
{
|
{
|
||||||
struct shim_service *service = (struct shim_service *)handle;
|
struct shim_service *service = (struct shim_service *)handle;
|
||||||
VCHIQ_BULK_MODE_T mode;
|
VCHIQ_BULK_MODE_T mode;
|
||||||
@ -250,7 +248,7 @@ EXPORT_SYMBOL(vchi_bulk_queue_receive);
|
|||||||
* Arguments: VCHI_BULK_HANDLE_T handle,
|
* Arguments: VCHI_BULK_HANDLE_T handle,
|
||||||
* const void *data_src,
|
* const void *data_src,
|
||||||
* uint32_t data_size,
|
* uint32_t data_size,
|
||||||
* VCHI_FLAGS_T flags,
|
* enum vchi_flags flags,
|
||||||
* void *bulk_handle
|
* void *bulk_handle
|
||||||
*
|
*
|
||||||
* Description: Routine to transmit some data
|
* 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,
|
int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle,
|
||||||
const void *data_src,
|
const void *data_src,
|
||||||
uint32_t data_size,
|
uint32_t data_size,
|
||||||
VCHI_FLAGS_T flags,
|
enum vchi_flags flags,
|
||||||
void *bulk_handle)
|
void *bulk_handle)
|
||||||
{
|
{
|
||||||
struct shim_service *service = (struct shim_service *)handle;
|
struct shim_service *service = (struct shim_service *)handle;
|
||||||
VCHIQ_BULK_MODE_T mode;
|
VCHIQ_BULK_MODE_T mode;
|
||||||
@ -313,18 +311,16 @@ EXPORT_SYMBOL(vchi_bulk_queue_transmit);
|
|||||||
* void *data,
|
* void *data,
|
||||||
* uint32_t max_data_size_to_read,
|
* uint32_t max_data_size_to_read,
|
||||||
* uint32_t *actual_msg_size
|
* uint32_t *actual_msg_size
|
||||||
* VCHI_FLAGS_T flags
|
* enum vchi_flags flags
|
||||||
*
|
*
|
||||||
* Description: Routine to dequeue a message into the supplied buffer
|
* Description: Routine to dequeue a message into the supplied buffer
|
||||||
*
|
*
|
||||||
* Returns: int32_t - success == 0
|
* Returns: int32_t - success == 0
|
||||||
*
|
*
|
||||||
***********************************************************/
|
***********************************************************/
|
||||||
int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle,
|
int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, void *data,
|
||||||
void *data,
|
uint32_t max_data_size_to_read,
|
||||||
uint32_t max_data_size_to_read,
|
uint32_t *actual_msg_size, enum vchi_flags flags)
|
||||||
uint32_t *actual_msg_size,
|
|
||||||
VCHI_FLAGS_T flags)
|
|
||||||
{
|
{
|
||||||
struct shim_service *service = (struct shim_service *)handle;
|
struct shim_service *service = (struct shim_service *)handle;
|
||||||
struct vchiq_header *header;
|
struct vchiq_header *header;
|
||||||
@ -383,7 +379,7 @@ EXPORT_SYMBOL(vchi_held_msg_release);
|
|||||||
* Arguments: VCHI_SERVICE_HANDLE_T handle,
|
* Arguments: VCHI_SERVICE_HANDLE_T handle,
|
||||||
* void **data,
|
* void **data,
|
||||||
* uint32_t *msg_size,
|
* uint32_t *msg_size,
|
||||||
* VCHI_FLAGS_T flags,
|
* enum vchi_flags flags,
|
||||||
* struct vchi_held_msg *message_handle
|
* struct vchi_held_msg *message_handle
|
||||||
*
|
*
|
||||||
* Description: Routine to return a pointer to the current message (to allow
|
* 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
|
* Returns: int32_t - success == 0
|
||||||
*
|
*
|
||||||
***********************************************************/
|
***********************************************************/
|
||||||
int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle,
|
int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, void **data,
|
||||||
void **data,
|
uint32_t *msg_size, enum vchi_flags flags,
|
||||||
uint32_t *msg_size,
|
struct vchi_held_msg *message_handle)
|
||||||
VCHI_FLAGS_T flags,
|
|
||||||
struct vchi_held_msg *message_handle)
|
|
||||||
{
|
{
|
||||||
struct shim_service *service = (struct shim_service *)handle;
|
struct shim_service *service = (struct shim_service *)handle;
|
||||||
struct vchiq_header *header;
|
struct vchiq_header *header;
|
||||||
@ -668,7 +662,7 @@ int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle)
|
|||||||
EXPORT_SYMBOL(vchi_service_destroy);
|
EXPORT_SYMBOL(vchi_service_destroy);
|
||||||
|
|
||||||
int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle,
|
int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle,
|
||||||
VCHI_SERVICE_OPTION_T option,
|
enum vchi_service_option option,
|
||||||
int value)
|
int value)
|
||||||
{
|
{
|
||||||
int32_t ret = -1;
|
int32_t ret = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user