* [PATCH v2 0/4] Staging: vc04_services: Code cleanup
@ 2017-09-13 6:36 Meghana Madhyastha
2017-09-13 6:37 ` [PATCH v2 1/4] Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T Meghana Madhyastha
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Meghana Madhyastha @ 2017-09-13 6:36 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Changes in v2:
-Rebase from master so that patch applies
-Include "Remove typedef VCHI_CONNECTION_API_T"
commit as part of this patchset.
Meghana Madhyastha (4):
Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T
Staging: vc04_services: Remove code under comments
Staging: vc04_services: Fix 80 column issue
Staging: vc04_services: Remove trailing whitespace
.../vc04_services/interface/vchi/connections/connection.h | 4 ++--
drivers/staging/vc04_services/interface/vchi/vchi.h | 9 ++++-----
drivers/staging/vc04_services/interface/vchi/vchi_common.h | 3 ---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 4 ++--
4 files changed, 8 insertions(+), 12 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/4] Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T
2017-09-13 6:36 [PATCH v2 0/4] Staging: vc04_services: Code cleanup Meghana Madhyastha
@ 2017-09-13 6:37 ` Meghana Madhyastha
2017-09-13 22:33 ` [Outreachy kernel] " Amitoj Kaur Chawla
2017-09-13 6:38 ` [PATCH v2 2/4] Staging: vc04_services: Remove code under comments Meghana Madhyastha
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Meghana Madhyastha @ 2017-09-13 6:37 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Removes the typedef for cleaner syntax.
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
---
.../staging/vc04_services/interface/vchi/connections/connection.h | 4 ++--
drivers/staging/vc04_services/interface/vchi/vchi.h | 8 ++++----
drivers/staging/vc04_services/interface/vchi/vchi_common.h | 3 ---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 4 ++--
4 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchi/connections/connection.h b/drivers/staging/vc04_services/interface/vchi/connections/connection.h
index e793cdf..4ec16ec 100644
--- a/drivers/staging/vc04_services/interface/vchi/connections/connection.h
+++ b/drivers/staging/vc04_services/interface/vchi/connections/connection.h
@@ -217,7 +217,7 @@ typedef void (*VCHI_BUFFER_FREE)(VCHI_CONNECTION_SERVICE_HANDLE_T service_hand
System driver struct
*****************************************************************************/
-struct opaque_vchi_connection_api_t {
+struct opaque_vchi_connection_api {
// Routine to init the connection
VCHI_CONNECTION_INIT_T init;
@@ -314,7 +314,7 @@ struct opaque_vchi_connection_api_t {
};
struct vchi_connection_t {
- const VCHI_CONNECTION_API_T *api;
+ const struct opaque_vchi_connection_api *api;
VCHI_CONNECTION_STATE_T *state;
#ifdef VCHI_COARSE_LOCKING
struct semaphore sem;
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
index addb7b0..7e14532 100644
--- a/drivers/staging/vc04_services/interface/vchi/vchi.h
+++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
@@ -159,7 +159,7 @@ typedef struct service_info_tag {
extern "C" {
#endif
-extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const VCHI_CONNECTION_API_T * function_table,
+extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const struct opaque_vchi_connection_api * function_table,
const VCHI_MESSAGE_DRIVER_T * low_level);
@@ -341,9 +341,9 @@ extern int32_t vchi_bulk_queue_transmit( VCHI_SERVICE_HANDLE_T handle,
*****************************************************************************/
// function prototypes for the different mid layers (the state info gives the different physical connections)
-extern const VCHI_CONNECTION_API_T *single_get_func_table( void );
-//extern const VCHI_CONNECTION_API_T *local_server_get_func_table( void );
-//extern const VCHI_CONNECTION_API_T *local_client_get_func_table( void );
+extern const struct opaque_vchi_connection_api *single_get_func_table( void );
+//extern const struct opaque_vchi_connection_api *local_server_get_func_table( void );
+//extern const struct opaque_vchi_connection_api *local_client_get_func_table( void );
// declare all message drivers here
const VCHI_MESSAGE_DRIVER_T *vchi_mphi_message_driver_func_table( void );
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi_common.h b/drivers/staging/vc04_services/interface/vchi/vchi_common.h
index 45c2070..7a4cf69 100644
--- a/drivers/staging/vc04_services/interface/vchi/vchi_common.h
+++ b/drivers/staging/vc04_services/interface/vchi/vchi_common.h
@@ -148,9 +148,6 @@ typedef struct vchi_msg_vector {
int32_t vec_len;
} VCHI_MSG_VECTOR_T;
-// Opaque type for a connection API
-typedef struct opaque_vchi_connection_api_t VCHI_CONNECTION_API_T;
-
// Opaque type for a message driver
typedef struct opaque_vchi_message_driver_t VCHI_MESSAGE_DRIVER_T;
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 8af95fc..44c7eea 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
@@ -62,14 +62,14 @@ vchi_mphi_message_driver_func_table(void)
/* ----------------------------------------------------------------------
* return a pointer to the 'single' connection driver fops
* -------------------------------------------------------------------- */
-const VCHI_CONNECTION_API_T *
+const struct opaque_vchi_connection_api *
single_get_func_table(void)
{
return NULL;
}
VCHI_CONNECTION_T *vchi_create_connection(
- const VCHI_CONNECTION_API_T *function_table,
+ const struct opaque_vchi_connection_api *function_table,
const VCHI_MESSAGE_DRIVER_T *low_level)
{
(void)function_table;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] Staging: vc04_services: Remove code under comments
2017-09-13 6:36 [PATCH v2 0/4] Staging: vc04_services: Code cleanup Meghana Madhyastha
2017-09-13 6:37 ` [PATCH v2 1/4] Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T Meghana Madhyastha
@ 2017-09-13 6:38 ` Meghana Madhyastha
2017-09-13 6:39 ` [PATCH v2 3/4] Staging: vc04_services: Fix 80 column issue Meghana Madhyastha
2017-09-13 6:40 ` [PATCH v2 4/4] Staging: vc04_services: Remove trailing whitespace Meghana Madhyastha
3 siblings, 0 replies; 6+ messages in thread
From: Meghana Madhyastha @ 2017-09-13 6:38 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Removes the code under comments.
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
---
drivers/staging/vc04_services/interface/vchi/vchi.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
index 7e14532..9fa9b93 100644
--- a/drivers/staging/vc04_services/interface/vchi/vchi.h
+++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
@@ -342,8 +342,6 @@ extern int32_t vchi_bulk_queue_transmit( VCHI_SERVICE_HANDLE_T handle,
// function prototypes for the different mid layers (the state info gives the different physical connections)
extern const struct opaque_vchi_connection_api *single_get_func_table( void );
-//extern const struct opaque_vchi_connection_api *local_server_get_func_table( void );
-//extern const struct opaque_vchi_connection_api *local_client_get_func_table( void );
// declare all message drivers here
const VCHI_MESSAGE_DRIVER_T *vchi_mphi_message_driver_func_table( void );
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/4] Staging: vc04_services: Fix 80 column issue
2017-09-13 6:36 [PATCH v2 0/4] Staging: vc04_services: Code cleanup Meghana Madhyastha
2017-09-13 6:37 ` [PATCH v2 1/4] Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T Meghana Madhyastha
2017-09-13 6:38 ` [PATCH v2 2/4] Staging: vc04_services: Remove code under comments Meghana Madhyastha
@ 2017-09-13 6:39 ` Meghana Madhyastha
2017-09-13 6:40 ` [PATCH v2 4/4] Staging: vc04_services: Remove trailing whitespace Meghana Madhyastha
3 siblings, 0 replies; 6+ messages in thread
From: Meghana Madhyastha @ 2017-09-13 6:39 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Make parameter appear on the next line to avoid
a single long line and split into smaller lines
for cleaner syntax.
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
---
drivers/staging/vc04_services/interface/vchi/vchi.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
index 9fa9b93..a1c3371 100644
--- a/drivers/staging/vc04_services/interface/vchi/vchi.h
+++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
@@ -159,8 +159,9 @@ typedef struct service_info_tag {
extern "C" {
#endif
-extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const struct opaque_vchi_connection_api * function_table,
- const VCHI_MESSAGE_DRIVER_T * low_level);
+extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(
+ const struct opaque_vchi_connection_api * function_table,
+ const VCHI_MESSAGE_DRIVER_T * low_level);
// Routine used to initialise the vchi on both local + remote connections
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/4] Staging: vc04_services: Remove trailing whitespace
2017-09-13 6:36 [PATCH v2 0/4] Staging: vc04_services: Code cleanup Meghana Madhyastha
` (2 preceding siblings ...)
2017-09-13 6:39 ` [PATCH v2 3/4] Staging: vc04_services: Fix 80 column issue Meghana Madhyastha
@ 2017-09-13 6:40 ` Meghana Madhyastha
3 siblings, 0 replies; 6+ messages in thread
From: Meghana Madhyastha @ 2017-09-13 6:40 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Found by checkpath.pl
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
---
drivers/staging/vc04_services/interface/vchi/vchi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
index a1c3371..ad8f542 100644
--- a/drivers/staging/vc04_services/interface/vchi/vchi.h
+++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
@@ -159,7 +159,7 @@ typedef struct service_info_tag {
extern "C" {
#endif
-extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(
+extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(
const struct opaque_vchi_connection_api * function_table,
const VCHI_MESSAGE_DRIVER_T * low_level);
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 1/4] Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T
2017-09-13 6:37 ` [PATCH v2 1/4] Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T Meghana Madhyastha
@ 2017-09-13 22:33 ` Amitoj Kaur Chawla
0 siblings, 0 replies; 6+ messages in thread
From: Amitoj Kaur Chawla @ 2017-09-13 22:33 UTC (permalink / raw)
To: Meghana Madhyastha; +Cc: Greg KH, outreachy-kernel
On Tue, Sep 12, 2017 at 11:37 PM, Meghana Madhyastha
<meghana.madhyastha@gmail.com> wrote:
> Removes the typedef for cleaner syntax.
>
> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
> ---
You should write what you changed in v2 from the first version over here.
For example if you changed the commit message in v2:
Changes in v2:
-Improved commit message
Since this is a patch series, if you only corrected some of the
patches in the series for your v2, you should mention what you changed
for the particular patch and you can write "No change" for the ones
that stayed the same.
Also if you send in a v3 with further corrections, make sure to
mention what you changed in v2 as well. An example could be:
Changes in v3:
-Fixed typo
Changes in v2:
-Improved commit message
Amitoj
> .../staging/vc04_services/interface/vchi/connections/connection.h | 4 ++--
> drivers/staging/vc04_services/interface/vchi/vchi.h | 8 ++++----
> drivers/staging/vc04_services/interface/vchi/vchi_common.h | 3 ---
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 4 ++--
> 4 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchi/connections/connection.h b/drivers/staging/vc04_services/interface/vchi/connections/connection.h
> index e793cdf..4ec16ec 100644
> --- a/drivers/staging/vc04_services/interface/vchi/connections/connection.h
> +++ b/drivers/staging/vc04_services/interface/vchi/connections/connection.h
> @@ -217,7 +217,7 @@ typedef void (*VCHI_BUFFER_FREE)(VCHI_CONNECTION_SERVICE_HANDLE_T service_hand
> System driver struct
> *****************************************************************************/
>
> -struct opaque_vchi_connection_api_t {
> +struct opaque_vchi_connection_api {
> // Routine to init the connection
> VCHI_CONNECTION_INIT_T init;
>
> @@ -314,7 +314,7 @@ struct opaque_vchi_connection_api_t {
> };
>
> struct vchi_connection_t {
> - const VCHI_CONNECTION_API_T *api;
> + const struct opaque_vchi_connection_api *api;
> VCHI_CONNECTION_STATE_T *state;
> #ifdef VCHI_COARSE_LOCKING
> struct semaphore sem;
> diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
> index addb7b0..7e14532 100644
> --- a/drivers/staging/vc04_services/interface/vchi/vchi.h
> +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
> @@ -159,7 +159,7 @@ typedef struct service_info_tag {
> extern "C" {
> #endif
>
> -extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const VCHI_CONNECTION_API_T * function_table,
> +extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const struct opaque_vchi_connection_api * function_table,
> const VCHI_MESSAGE_DRIVER_T * low_level);
>
>
> @@ -341,9 +341,9 @@ extern int32_t vchi_bulk_queue_transmit( VCHI_SERVICE_HANDLE_T handle,
> *****************************************************************************/
>
> // function prototypes for the different mid layers (the state info gives the different physical connections)
> -extern const VCHI_CONNECTION_API_T *single_get_func_table( void );
> -//extern const VCHI_CONNECTION_API_T *local_server_get_func_table( void );
> -//extern const VCHI_CONNECTION_API_T *local_client_get_func_table( void );
> +extern const struct opaque_vchi_connection_api *single_get_func_table( void );
> +//extern const struct opaque_vchi_connection_api *local_server_get_func_table( void );
> +//extern const struct opaque_vchi_connection_api *local_client_get_func_table( void );
>
> // declare all message drivers here
> const VCHI_MESSAGE_DRIVER_T *vchi_mphi_message_driver_func_table( void );
> diff --git a/drivers/staging/vc04_services/interface/vchi/vchi_common.h b/drivers/staging/vc04_services/interface/vchi/vchi_common.h
> index 45c2070..7a4cf69 100644
> --- a/drivers/staging/vc04_services/interface/vchi/vchi_common.h
> +++ b/drivers/staging/vc04_services/interface/vchi/vchi_common.h
> @@ -148,9 +148,6 @@ typedef struct vchi_msg_vector {
> int32_t vec_len;
> } VCHI_MSG_VECTOR_T;
>
> -// Opaque type for a connection API
> -typedef struct opaque_vchi_connection_api_t VCHI_CONNECTION_API_T;
> -
> // Opaque type for a message driver
> typedef struct opaque_vchi_message_driver_t VCHI_MESSAGE_DRIVER_T;
>
> 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 8af95fc..44c7eea 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> @@ -62,14 +62,14 @@ vchi_mphi_message_driver_func_table(void)
> /* ----------------------------------------------------------------------
> * return a pointer to the 'single' connection driver fops
> * -------------------------------------------------------------------- */
> -const VCHI_CONNECTION_API_T *
> +const struct opaque_vchi_connection_api *
> single_get_func_table(void)
> {
> return NULL;
> }
>
> VCHI_CONNECTION_T *vchi_create_connection(
> - const VCHI_CONNECTION_API_T *function_table,
> + const struct opaque_vchi_connection_api *function_table,
> const VCHI_MESSAGE_DRIVER_T *low_level)
> {
> (void)function_table;
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/48c429bdd6f6bb00c2a95f27882804ab6ac8aad9.1505284040.git.meghana.madhyastha%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-09-13 22:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-13 6:36 [PATCH v2 0/4] Staging: vc04_services: Code cleanup Meghana Madhyastha
2017-09-13 6:37 ` [PATCH v2 1/4] Staging: vc04_services: Remove typedef VCHI_CONNECTION_API_T Meghana Madhyastha
2017-09-13 22:33 ` [Outreachy kernel] " Amitoj Kaur Chawla
2017-09-13 6:38 ` [PATCH v2 2/4] Staging: vc04_services: Remove code under comments Meghana Madhyastha
2017-09-13 6:39 ` [PATCH v2 3/4] Staging: vc04_services: Fix 80 column issue Meghana Madhyastha
2017-09-13 6:40 ` [PATCH v2 4/4] Staging: vc04_services: Remove trailing whitespace Meghana Madhyastha
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.