From: Greg KH <gregkh@linuxfoundation.org>
To: Jamal Shareef <jamal.k.shareef@gmail.com>
Cc: outreachy-kernel@googlegroups.com, eric@anholt.net, wahrenst@gmx.net
Subject: Re: [PATCH v5 01/10] staging: vc04_services: Remove instance struct typedef
Date: Sun, 3 Nov 2019 13:12:53 +0100 [thread overview]
Message-ID: <20191103121253.GA602586@kroah.com> (raw)
In-Reply-To: <8774abbd755f78cde4fff36ca75ea0e3a5519cd0.1572755439.git.jamal.k.shareef@gmail.com>
On Sat, Nov 02, 2019 at 09:36:58PM -0700, Jamal Shareef wrote:
> Removes opaque vchi instance struct typedefs. Issue found by
> checkpatch.
What do you mean here by "opaque"?
>
> Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> ---
> .../bcm2835-audio/bcm2835-vchiq.c | 2 +-
> .../vc04_services/bcm2835-audio/bcm2835.h | 2 +-
> .../vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +-
> .../vc04_services/interface/vchi/vchi.h | 12 +++---
> .../interface/vchi/vchi_common.h | 2 +-
> .../interface/vchiq_arm/vchiq_shim.c | 43 +++++++++----------
> 6 files changed, 31 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> index 84ece768854f..2022ff2388dc 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
> @@ -122,7 +122,7 @@ static void audio_vchi_callback(void *param,
> }
>
> static int
> -vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
> +vc_vchi_audio_init(struct vchi_instance_handle *vchi_instance,
> struct bcm2835_audio_instance *instance)
> {
> struct service_creation params = {
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
> index ed0feb34b6c8..d2fe8d36ab7d 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
> +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
> @@ -44,7 +44,7 @@ enum snd_bcm2835_ctrl {
> };
>
> struct bcm2835_vchi_ctx {
> - VCHI_INSTANCE_T vchi_instance;
> + struct vchi_instance_handle *vchi_instance;
> };
>
> /* definition of the chip-specific record */
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
> index 06b7be7d8872..0f4db2f24944 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
> @@ -1814,7 +1814,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)
> {
> int status;
> struct vchiq_mmal_instance *instance;
> - static VCHI_INSTANCE_T vchi_instance;
> + static struct vchi_instance_handle *vchi_instance;
> struct service_creation params = {
> .version = VCHI_VERSION_EX(VC_MMAL_VER, VC_MMAL_MIN_VER),
> .service_id = VC_MMAL_SERVER_NAME,
> diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
> index 75b1ab4919e3..5c8842114607 100644
> --- a/drivers/staging/vc04_services/interface/vchi/vchi.h
> +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
> @@ -50,7 +50,7 @@ struct service_creation {
> };
>
> // Opaque handle for a VCHI instance
> -typedef struct opaque_vchi_instance_handle_t *VCHI_INSTANCE_T;
> +struct vchi_instance_handle;
>
> // Opaque handle for a server or client
> typedef struct opaque_vchi_service_handle_t *VCHI_SERVICE_HANDLE_T;
> @@ -65,20 +65,20 @@ extern "C" {
> #endif
>
> // Routine used to initialise the vchi on both local + remote connections
> -extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle);
> +extern int32_t vchi_initialise(struct vchi_instance_handle **instance_handle);
>
> extern int32_t vchi_exit(void);
>
> -extern int32_t vchi_connect(VCHI_INSTANCE_T instance_handle);
> +extern int32_t vchi_connect(struct vchi_instance_handle *instance_handle);
>
> //When this is called, ensure that all services have no data pending.
> //Bulk transfers can remain 'queued'
> -extern int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle);
> +extern int32_t vchi_disconnect(struct vchi_instance_handle *instance_handle);
>
> // helper functions
> extern void *vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length);
> extern void vchi_free_buffer(VCHI_SERVICE_HANDLE_T handle, void *address);
> -extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle);
> +extern uint32_t vchi_current_time(struct vchi_instance_handle *instance_handle);
>
> /******************************************************************************
> * Global service API
> @@ -87,7 +87,7 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle);
> extern int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle);
>
> // Routine to open a named service
> -extern int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
> +extern int32_t vchi_service_open(struct vchi_instance_handle *instance_handle,
> struct service_creation *setup,
> VCHI_SERVICE_HANDLE_T *handle);
>
> diff --git a/drivers/staging/vc04_services/interface/vchi/vchi_common.h b/drivers/staging/vc04_services/interface/vchi/vchi_common.h
> index c99735fc0308..fba37559aa83 100644
> --- a/drivers/staging/vc04_services/interface/vchi/vchi_common.h
> +++ b/drivers/staging/vc04_services/interface/vchi/vchi_common.h
> @@ -86,7 +86,7 @@ enum vchi_service_option {
> };
>
> //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
Why the extra space?
> 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 704afd470c88..a2434a68fc2f 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> @@ -23,7 +23,7 @@ struct shim_service {
> /***********************************************************
> * Name: vchi_msg_peek
> *
> - * Arguments: const VCHI_SERVICE_HANDLE_T handle,
> + * Arguments: VCHI_SERVICE_HANDLE_T handle,
Did you change the const?
> * void **data,
> * uint32_t *msg_size,
>
> @@ -63,7 +63,7 @@ EXPORT_SYMBOL(vchi_msg_peek);
> /***********************************************************
> * Name: vchi_msg_remove
> *
> - * Arguments: const VCHI_SERVICE_HANDLE_T handle,
> + * Arguments: VCHI_SERVICE_HANDLE_T handle,
Huh? What does this change mean?
> *
> * Description: Routine to remove a message (after it has been read with
> * vchi_msg_peek)
> @@ -100,10 +100,9 @@ EXPORT_SYMBOL(vchi_msg_remove);
> ***********************************************************/
> static
> 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)
> + ssize_t (*copy_callback)(void *context, void *dest,
> + size_t offset, size_t maxsize),
> + void *context, uint32_t data_size)
> {
> struct shim_service *service = (struct shim_service *)handle;
> VCHIQ_STATUS_T status;
> @@ -169,8 +168,7 @@ vchi_queue_user_message_callback(void *context,
> }
>
> int
> -vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle,
> - void __user *data,
> +vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, void __user *data,
> unsigned int size)
> {
> struct vchi_queue_user_message_context copycontext = {
> @@ -187,7 +185,7 @@ EXPORT_SYMBOL(vchi_queue_user_message);
> /***********************************************************
> * Name: vchi_bulk_queue_receive
> *
> - * Arguments: VCHI_BULK_HANDLE_T handle,
> + * Arguments: VCHI_SERVICE_HANDLE_T handle,
Huh???
> * void *data_dst,
> * const uint32_t data_size,
> * enum vchi_flags flags
> @@ -245,7 +243,7 @@ EXPORT_SYMBOL(vchi_bulk_queue_receive);
> /***********************************************************
> * Name: vchi_bulk_queue_transmit
> *
> - * Arguments: VCHI_BULK_HANDLE_T handle,
> + * Arguments: VCHI_SERVICE_HANDLE_T handle,
Did you change this???
This series is "rough". Please take a day off, step back and try doing
all of this "from scratch", doing only one thing per patch.
thanks,
greg k-h
next prev parent reply other threads:[~2019-11-03 12:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-03 4:36 [PATCH v5 00/10] staging: vc04_services: Remove typedefs Jamal Shareef
2019-11-03 4:36 ` [PATCH v5 01/10] staging: vc04_services: Remove instance struct typedef Jamal Shareef
2019-11-03 12:12 ` Greg KH [this message]
2019-11-03 21:41 ` Jamal Shareef
2019-11-03 4:36 ` [PATCH v5 02/10] staging: vc04_services: remove service " Jamal Shareef
2019-11-03 4:37 ` [PATCH v5 03/10] staging: vc04_services: Rename function pointer typedef Jamal Shareef
2019-11-03 4:37 ` [PATCH v5 04/10] staging: vc04_services: Remove vchiq_arm enum typedefs Jamal Shareef
2019-11-03 8:03 ` [Outreachy kernel] " Julia Lawall
2019-11-03 4:37 ` [PATCH v5 05/10] staging: vc04_services: Rename userdata callback Jamal Shareef
2019-11-03 4:37 ` [PATCH v5 06/10] staging: vc04_services: Renames vchiq callback Jamal Shareef
2019-11-03 4:37 ` [PATCH v5 07/10] staging: vc04_services: Renames remote use callback Jamal Shareef
2019-11-03 7:45 ` [Outreachy kernel] " Julia Lawall
2019-11-03 8:17 ` Stefan Wahren
2019-11-03 8:40 ` Julia Lawall
2019-11-03 13:04 ` Stefan Wahren
2019-11-03 4:37 ` [PATCH v5 08/10] staging: vc04_services: Remove int typedef Jamal Shareef
2019-11-03 4:37 ` [PATCH v5 09/10] staging: vc04_services: Remove vchiq instance typedefs Jamal Shareef
2019-11-03 4:37 ` [PATCH v5 10/10] staging: vc04_services: Removes platform struct typedef Jamal Shareef
2019-11-03 7:14 ` [Outreachy kernel] " Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191103121253.GA602586@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=eric@anholt.net \
--cc=jamal.k.shareef@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=wahrenst@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.