[PATCH] staging: sm750fb: Fix typo frambuffer->framebuffer
This patch corrects a typo (frambuffer->framebuffer) in the sm750fb_fram(e)buffer_release and sm750fb_fram(e)buffer_alloc function names. Signed-off-by: Aymen Qader --- drivers/staging/sm750fb/sm750.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 846d7d243994..e9f10c2669ea 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1007,7 +1007,7 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src) } } -static void sm750fb_frambuffer_release(struct sm750_dev *sm750_dev) +static void sm750fb_framebuffer_release(struct sm750_dev *sm750_dev) { struct fb_info *fb_info; @@ -1019,7 +1019,7 @@ static void sm750fb_frambuffer_release(struct sm750_dev *sm750_dev) } } -static int sm750fb_frambuffer_alloc(struct sm750_dev *sm750_dev, int fbidx) +static int sm750fb_framebuffer_alloc(struct sm750_dev *sm750_dev, int fbidx) { struct fb_info *fb_info; struct lynxfb_par *par; @@ -1137,7 +1137,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, /* allocate frame buffer info structures according to g_dualview */ max_fb = g_dualview ? 2 : 1; for (fbidx = 0; fbidx < max_fb; fbidx++) { - err = sm750fb_frambuffer_alloc(sm750_dev, fbidx); + err = sm750fb_framebuffer_alloc(sm750_dev, fbidx); if (err) goto release_fb; } @@ -1145,7 +1145,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, return 0; release_fb: - sm750fb_frambuffer_release(sm750_dev); + sm750fb_framebuffer_release(sm750_dev); return err; } @@ -1155,7 +1155,7 @@ static void lynxfb_pci_remove(struct pci_dev *pdev) sm750_dev = pci_get_drvdata(pdev); - sm750fb_frambuffer_release(sm750_dev); + sm750fb_framebuffer_release(sm750_dev); arch_phys_wc_del(sm750_dev->mtrr.vram); iounmap(sm750_dev->pvReg); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/5] staging: vc04_services: Fix "space prohibited"
This patch fixes the checkpatch.pl error: ERROR: space prohibited after/before that open/closed parenthesis in the interface/vchi directory. Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 106 +- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 66a3a060fad2..ffb8caaacaea 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -98,7 +98,7 @@ typedef struct vchi_msg_vector_ex { #define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } // Macros to manipulate 'FOURCC' values -#define MAKE_FOURCC(x) ((int32_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] )) +#define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) #define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF // Opaque service information @@ -154,25 +154,25 @@ 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 VCHI_CONNECTION_API_T * function_table, const VCHI_MESSAGE_DRIVER_T * low_level); // 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(VCHI_INSTANCE_T *instance_handle); -extern int32_t vchi_exit( void ); +extern int32_t vchi_exit(void); -extern int32_t vchi_connect( VCHI_CONNECTION_T **connections, +extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle ); + VCHI_INSTANCE_T 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(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking -extern int32_t vchi_crc_control( VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control ); +extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -183,32 +183,32 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); Global service API */ // Routine to create a named service -extern int32_t vchi_service_create( VCHI_INSTANCE_T instance_handle, +extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle ); +VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service -extern int32_t vchi_service_destroy( const VCHI_SERVICE_HANDLE_T 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(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, VCHI_SERVICE_HANDLE_T *handle); -extern int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle, - short *peer_version ); +extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, + short *peer_version); // Routine to close a named service -extern int32_t vchi_service_close( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); // Routine to increment ref count on a named service -extern int32_t vchi_service_use( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_use(const VCHI_SERVICE_HANDLE_T handle); // Routine to decrement ref count on a named service -extern int32_t vchi_service_release( const VCHI_SERVICE_HANDLE_T handle ); +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, +extern int32_t vchi_service_set_option(cons
[PATCH 4/5] staging: vc04_services: Surround complex macros
This patch fixes the checkpatch.pl error: ERROR: Macros with complex values should be enclosed in parentheses in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index d8e660240a44..f818cf2e27e1 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -92,14 +92,14 @@ typedef struct vchi_msg_vector_ex { } VCHI_MSG_VECTOR_EX_T; // Construct an entry in a msg vector for a pointer (p) of length (l) -#define VCHI_VEC_POINTER(p, l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } +#define VCHI_VEC_POINTER(p, l) (VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } }) // Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l) -#define VCHI_VEC_HANDLE(h, o, l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } +#define VCHI_VEC_HANDLE(h, o, l) (VCHI_VEC_HANDLE, { { (h), (o), (l) } }) // Macros to manipulate 'FOURCC' values #define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) -#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF, (x >> 16) & 0xFF, (x >> 8) & 0xFF, x & 0xFF +#define FOURCC_TO_CHAR(x) ((x >> 24) & 0xFF, (x >> 16) & 0xFF, (x >> 8) & 0xFF, x & 0xFF) // Opaque service information struct opaque_vchi_service_t; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/5] staging: vc04_services: Remove spaces after '*'
This patch fixes the checkpatch.pl error: ERROR: "foo * bar" should be "foo* bar" in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index f818cf2e27e1..77bf92018165 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -154,7 +154,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 VCHI_CONNECTION_API_T * function_table, const VCHI_MESSAGE_DRIVER_T * low_level); // Routine used to initialise the vchi on both local + remote connections @@ -175,7 +175,7 @@ extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, VCHI_CRC_CONTROL_T control); // helper functions -extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); +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); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/5] staging: vc04_services: Use tabs instead of spaces
This patch fixes the checkpatch.pl error: ERROR: code indent should use tabs where possible in the interface/vchi directory Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 116 +- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index ffb8caaacaea..cb2582a4eb6a 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -71,23 +71,23 @@ typedef struct vchi_msg_vector_ex { VCHI_MSG_VECTOR_TYPE_T type; union { // a memory handle - struct { - VCHI_MEM_HANDLE_T handle; - uint32_t offset; - int32_t vec_len; - } handle; + struct { + VCHI_MEM_HANDLE_T handle; + uint32_t offset; + int32_t vec_len; + } handle; // an ordinary data pointer - struct { - const void *vec_base; - int32_t vec_len; + struct { + const void *vec_base; + int32_t vec_len; } ptr; // a nested vector list - struct { - struct vchi_msg_vector_ex *vec; - uint32_t vec_len; - } list; + struct { + struct vchi_msg_vector_ex *vec; + uint32_t vec_len; + } list; } u; } VCHI_MSG_VECTOR_EX_T; @@ -155,7 +155,7 @@ extern "C" { #endif extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(const VCHI_CONNECTION_API_T * function_table, - const VCHI_MESSAGE_DRIVER_T * low_level); +const VCHI_MESSAGE_DRIVER_T * low_level); // Routine used to initialise the vchi on both local + remote connections extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); @@ -163,8 +163,8 @@ extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); extern int32_t vchi_exit(void); extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, - const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle); + const uint32_t num_connections, + VCHI_INSTANCE_T instance_handle); //When this is called, ensure that all services have no data pending. //Bulk transfers can remain 'queued' @@ -172,7 +172,7 @@ extern int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control); + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -184,19 +184,19 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); */ // Routine to create a named service extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, -SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle); + SERVICE_CREATION_T *setup, + VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service 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, - SERVICE_CREATION_T *setup, - VCHI_SERVICE_HANDLE_T *handle); +SERVICE_CREATION_T *setup, +VCHI_SERVICE_HANDLE_T *handle); extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, - short *peer_version); +short *peer_version); // Routine to close a named service extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); @@ -227,18 +227,18 @@ vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, // Routine to receive a msg from a service // Dequeue is equivalent to hold, copy into client buffer, release 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); + void *data, + uint32_t max_data_size_to_read, + uint32_t *actual_msg_size, + VCHI_FLAGS_T flags); // Routine to look at a messa
[PATCH 3/5] staging: vc04_services: Add spaces after commas
This patch fixes the checkpatch.pl error: ERROR: space required after that ',' in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index cb2582a4eb6a..d8e660240a44 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -92,14 +92,14 @@ typedef struct vchi_msg_vector_ex { } VCHI_MSG_VECTOR_EX_T; // Construct an entry in a msg vector for a pointer (p) of length (l) -#define VCHI_VEC_POINTER(p,l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } +#define VCHI_VEC_POINTER(p, l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } // Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l) -#define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } +#define VCHI_VEC_HANDLE(h, o, l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } // Macros to manipulate 'FOURCC' values #define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) -#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF +#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF, (x >> 16) & 0xFF, (x >> 8) & 0xFF, x & 0xFF // Opaque service information struct opaque_vchi_service_t; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/5] staging: vc04_services: Fix checkpatch.pl errors
This patchset fixes the following checkpatch.pl errors in the interface/vchi directory: ERROR: space prohibited after/before that open/closed parenthesis ERROR: code indent should use tabs where possible ERROR: space required after that ',' ERROR: Macros with complex values should be enclosed in parentheses ERROR: Macros with complex values should be enclosed in parenthese Aymen Qader (5): staging: vc04_services: Fix "space prohibited" staging: vc04_services: Use tabs instead of spaces staging: vc04_services: Add spaces after commas staging: vc04_services: Surround complex macros staging: vc04_services: Remove spaces after '*' .../vc04_services/interface/vchi/vchi.h | 200 +- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 101 insertions(+), 101 deletions(-) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 0/5] staging: vc04_services: Fix checkpatch.pl errors
This patchset fixes the following checkpatch.pl errors in the interface/vchi directory: ERROR: space prohibited after/before that open/closed parenthesis ERROR: code indent should use tabs where possible ERROR: space required after that ',' ERROR: Macros with complex values should be enclosed in parentheses ERROR: "foo * bar" should be "foo* bar" Aymen Qader (5): staging: vc04_services: Fix "space prohibited" staging: vc04_services: Use tabs instead of spaces staging: vc04_services: Add spaces after commas staging: vc04_services: Surround complex macros staging: vc04_services: Remove spaces after '*' v2: Added cover letter correctly .../vc04_services/interface/vchi/vchi.h | 200 +- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 101 insertions(+), 101 deletions(-) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/5] staging: vc04_services: Use tabs instead of spaces
This patch fixes the checkpatch.pl error: ERROR: code indent should use tabs where possible in the interface/vchi directory Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 116 +- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index ffb8caaacaea..cb2582a4eb6a 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -71,23 +71,23 @@ typedef struct vchi_msg_vector_ex { VCHI_MSG_VECTOR_TYPE_T type; union { // a memory handle - struct { - VCHI_MEM_HANDLE_T handle; - uint32_t offset; - int32_t vec_len; - } handle; + struct { + VCHI_MEM_HANDLE_T handle; + uint32_t offset; + int32_t vec_len; + } handle; // an ordinary data pointer - struct { - const void *vec_base; - int32_t vec_len; + struct { + const void *vec_base; + int32_t vec_len; } ptr; // a nested vector list - struct { - struct vchi_msg_vector_ex *vec; - uint32_t vec_len; - } list; + struct { + struct vchi_msg_vector_ex *vec; + uint32_t vec_len; + } list; } u; } VCHI_MSG_VECTOR_EX_T; @@ -155,7 +155,7 @@ extern "C" { #endif extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(const VCHI_CONNECTION_API_T * function_table, - const VCHI_MESSAGE_DRIVER_T * low_level); +const VCHI_MESSAGE_DRIVER_T * low_level); // Routine used to initialise the vchi on both local + remote connections extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); @@ -163,8 +163,8 @@ extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); extern int32_t vchi_exit(void); extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, - const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle); + const uint32_t num_connections, + VCHI_INSTANCE_T instance_handle); //When this is called, ensure that all services have no data pending. //Bulk transfers can remain 'queued' @@ -172,7 +172,7 @@ extern int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control); + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -184,19 +184,19 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); */ // Routine to create a named service extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, -SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle); + SERVICE_CREATION_T *setup, + VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service 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, - SERVICE_CREATION_T *setup, - VCHI_SERVICE_HANDLE_T *handle); +SERVICE_CREATION_T *setup, +VCHI_SERVICE_HANDLE_T *handle); extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, - short *peer_version); +short *peer_version); // Routine to close a named service extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); @@ -227,18 +227,18 @@ vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, // Routine to receive a msg from a service // Dequeue is equivalent to hold, copy into client buffer, release 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); + void *data, + uint32_t max_data_size_to_read, + uint32_t *actual_msg_size, + VCHI_FLAGS_T flags); // Routine to look at a messa
[PATCH v2 1/5] staging: vc04_services: Fix "space prohibited"
This patch fixes the checkpatch.pl error: ERROR: space prohibited after/before that open/closed parenthesis in the interface/vchi directory. Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 106 +- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 66a3a060fad2..ffb8caaacaea 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -98,7 +98,7 @@ typedef struct vchi_msg_vector_ex { #define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } // Macros to manipulate 'FOURCC' values -#define MAKE_FOURCC(x) ((int32_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] )) +#define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) #define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF // Opaque service information @@ -154,25 +154,25 @@ 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 VCHI_CONNECTION_API_T * function_table, const VCHI_MESSAGE_DRIVER_T * low_level); // 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(VCHI_INSTANCE_T *instance_handle); -extern int32_t vchi_exit( void ); +extern int32_t vchi_exit(void); -extern int32_t vchi_connect( VCHI_CONNECTION_T **connections, +extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle ); + VCHI_INSTANCE_T 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(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking -extern int32_t vchi_crc_control( VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control ); +extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -183,32 +183,32 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); Global service API */ // Routine to create a named service -extern int32_t vchi_service_create( VCHI_INSTANCE_T instance_handle, +extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle ); +VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service -extern int32_t vchi_service_destroy( const VCHI_SERVICE_HANDLE_T 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(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, VCHI_SERVICE_HANDLE_T *handle); -extern int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle, - short *peer_version ); +extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, + short *peer_version); // Routine to close a named service -extern int32_t vchi_service_close( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); // Routine to increment ref count on a named service -extern int32_t vchi_service_use( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_use(const VCHI_SERVICE_HANDLE_T handle); // Routine to decrement ref count on a named service -extern int32_t vchi_service_release( const VCHI_SERVICE_HANDLE_T handle ); +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, +extern int32_t vchi_service_set_option(cons
[PATCH v2 3/5] staging: vc04_services: Add spaces after commas
This patch fixes the checkpatch.pl error: ERROR: space required after that ',' in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index cb2582a4eb6a..d8e660240a44 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -92,14 +92,14 @@ typedef struct vchi_msg_vector_ex { } VCHI_MSG_VECTOR_EX_T; // Construct an entry in a msg vector for a pointer (p) of length (l) -#define VCHI_VEC_POINTER(p,l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } +#define VCHI_VEC_POINTER(p, l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } // Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l) -#define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } +#define VCHI_VEC_HANDLE(h, o, l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } // Macros to manipulate 'FOURCC' values #define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) -#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF +#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF, (x >> 16) & 0xFF, (x >> 8) & 0xFF, x & 0xFF // Opaque service information struct opaque_vchi_service_t; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 5/5] staging: vc04_services: Remove spaces after '*'
This patch fixes the checkpatch.pl error: ERROR: "foo * bar" should be "foo* bar" in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index f818cf2e27e1..77bf92018165 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -154,7 +154,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 VCHI_CONNECTION_API_T * function_table, const VCHI_MESSAGE_DRIVER_T * low_level); // Routine used to initialise the vchi on both local + remote connections @@ -175,7 +175,7 @@ extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, VCHI_CRC_CONTROL_T control); // helper functions -extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); +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); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 4/5] staging: vc04_services: Surround complex macros
This patch fixes the checkpatch.pl error: ERROR: Macros with complex values should be enclosed in parentheses in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index d8e660240a44..f818cf2e27e1 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -92,14 +92,14 @@ typedef struct vchi_msg_vector_ex { } VCHI_MSG_VECTOR_EX_T; // Construct an entry in a msg vector for a pointer (p) of length (l) -#define VCHI_VEC_POINTER(p, l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } +#define VCHI_VEC_POINTER(p, l) (VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } }) // Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l) -#define VCHI_VEC_HANDLE(h, o, l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } +#define VCHI_VEC_HANDLE(h, o, l) (VCHI_VEC_HANDLE, { { (h), (o), (l) } }) // Macros to manipulate 'FOURCC' values #define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) -#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF, (x >> 16) & 0xFF, (x >> 8) & 0xFF, x & 0xFF +#define FOURCC_TO_CHAR(x) ((x >> 24) & 0xFF, (x >> 16) & 0xFF, (x >> 8) & 0xFF, x & 0xFF) // Opaque service information struct opaque_vchi_service_t; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/4] staging: vc04_services: Fix checkpatch.pl errors
This patchset fixes the following checkpatch.pl errors in the interface/vchi directory: ERROR: space prohibited after/before that open/closed parenthesis ERROR: code indent should use tabs where possible ERROR: space required after that ',' ERROR: Macros with complex values should be enclosed in parentheses ERROR: "foo * bar" should be "foo* bar" Aymen Qader (4): staging: vc04_services: Fix "space prohibited" staging: vc04_services: Use tabs instead of spaces staging: vc04_services: Remove unused macros staging: vc04_services: Remove spaces after '*' .../vc04_services/interface/vchi/vchi.h | 208 +++--- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 86 insertions(+), 124 deletions(-) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 3/4] staging: vc04_services: Remove unused macros
This patch removes the macros and structs associated with the "vchi_msg_queuev_ex" function, which was previously removed in 49bec49. Also fixes the checkpatch.pl errors: ERROR: Macros with complex values should be enclosed in parentheses ERROR: space required after that ',' Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 38 --- 1 file changed, 38 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index cb2582a4eb6a..f96676227ddc 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -60,46 +60,8 @@ struct vchi_version { #define VCHI_VERSION(v_) { v_, v_ } #define VCHI_VERSION_EX(v_, m_) { v_, m_ } -typedef enum { - VCHI_VEC_POINTER, - VCHI_VEC_HANDLE, - VCHI_VEC_LIST -} VCHI_MSG_VECTOR_TYPE_T; - -typedef struct vchi_msg_vector_ex { - - VCHI_MSG_VECTOR_TYPE_T type; - union { - // a memory handle - struct { - VCHI_MEM_HANDLE_T handle; - uint32_t offset; - int32_t vec_len; - } handle; - - // an ordinary data pointer - struct { - const void *vec_base; - int32_t vec_len; - } ptr; - - // a nested vector list - struct { - struct vchi_msg_vector_ex *vec; - uint32_t vec_len; - } list; - } u; -} VCHI_MSG_VECTOR_EX_T; - -// Construct an entry in a msg vector for a pointer (p) of length (l) -#define VCHI_VEC_POINTER(p,l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } - -// Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l) -#define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } - // Macros to manipulate 'FOURCC' values #define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) -#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF // Opaque service information struct opaque_vchi_service_t; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/4] staging: vc04_services: Use tabs instead of spaces
This patch fixes the checkpatch.pl error: ERROR: code indent should use tabs where possible in the interface/vchi directory Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 116 +- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index ffb8caaacaea..cb2582a4eb6a 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -71,23 +71,23 @@ typedef struct vchi_msg_vector_ex { VCHI_MSG_VECTOR_TYPE_T type; union { // a memory handle - struct { - VCHI_MEM_HANDLE_T handle; - uint32_t offset; - int32_t vec_len; - } handle; + struct { + VCHI_MEM_HANDLE_T handle; + uint32_t offset; + int32_t vec_len; + } handle; // an ordinary data pointer - struct { - const void *vec_base; - int32_t vec_len; + struct { + const void *vec_base; + int32_t vec_len; } ptr; // a nested vector list - struct { - struct vchi_msg_vector_ex *vec; - uint32_t vec_len; - } list; + struct { + struct vchi_msg_vector_ex *vec; + uint32_t vec_len; + } list; } u; } VCHI_MSG_VECTOR_EX_T; @@ -155,7 +155,7 @@ extern "C" { #endif extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(const VCHI_CONNECTION_API_T * function_table, - const VCHI_MESSAGE_DRIVER_T * low_level); +const VCHI_MESSAGE_DRIVER_T * low_level); // Routine used to initialise the vchi on both local + remote connections extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); @@ -163,8 +163,8 @@ extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); extern int32_t vchi_exit(void); extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, - const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle); + const uint32_t num_connections, + VCHI_INSTANCE_T instance_handle); //When this is called, ensure that all services have no data pending. //Bulk transfers can remain 'queued' @@ -172,7 +172,7 @@ extern int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control); + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -184,19 +184,19 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); */ // Routine to create a named service extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, -SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle); + SERVICE_CREATION_T *setup, + VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service 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, - SERVICE_CREATION_T *setup, - VCHI_SERVICE_HANDLE_T *handle); +SERVICE_CREATION_T *setup, +VCHI_SERVICE_HANDLE_T *handle); extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, - short *peer_version); +short *peer_version); // Routine to close a named service extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); @@ -227,18 +227,18 @@ vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, // Routine to receive a msg from a service // Dequeue is equivalent to hold, copy into client buffer, release 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); + void *data, + uint32_t max_data_size_to_read, + uint32_t *actual_msg_size, + VCHI_FLAGS_T flags); // Routine to look at a messa
[PATCH v3 1/4] staging: vc04_services: Fix "space prohibited"
This patch fixes the checkpatch.pl error: ERROR: space prohibited after/before that open/closed parenthesis in the interface/vchi directory. Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 106 +- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 66a3a060fad2..ffb8caaacaea 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -98,7 +98,7 @@ typedef struct vchi_msg_vector_ex { #define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } // Macros to manipulate 'FOURCC' values -#define MAKE_FOURCC(x) ((int32_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] )) +#define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) #define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF // Opaque service information @@ -154,25 +154,25 @@ 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 VCHI_CONNECTION_API_T * function_table, const VCHI_MESSAGE_DRIVER_T * low_level); // 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(VCHI_INSTANCE_T *instance_handle); -extern int32_t vchi_exit( void ); +extern int32_t vchi_exit(void); -extern int32_t vchi_connect( VCHI_CONNECTION_T **connections, +extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle ); + VCHI_INSTANCE_T 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(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking -extern int32_t vchi_crc_control( VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control ); +extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -183,32 +183,32 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); Global service API */ // Routine to create a named service -extern int32_t vchi_service_create( VCHI_INSTANCE_T instance_handle, +extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle ); +VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service -extern int32_t vchi_service_destroy( const VCHI_SERVICE_HANDLE_T 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(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, VCHI_SERVICE_HANDLE_T *handle); -extern int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle, - short *peer_version ); +extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, + short *peer_version); // Routine to close a named service -extern int32_t vchi_service_close( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); // Routine to increment ref count on a named service -extern int32_t vchi_service_use( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_use(const VCHI_SERVICE_HANDLE_T handle); // Routine to decrement ref count on a named service -extern int32_t vchi_service_release( const VCHI_SERVICE_HANDLE_T handle ); +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, +extern int32_t vchi_service_set_option(cons
[PATCH v3 4/4] staging: vc04_services: Remove spaces after '*'
This patch fixes the checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index f96676227ddc..3fe19d72b3ab 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -116,8 +116,8 @@ typedef struct service_info_tag { extern "C" { #endif -extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(const VCHI_CONNECTION_API_T * function_table, -const VCHI_MESSAGE_DRIVER_T * low_level); +extern /*@observer@*/ VCHI_CONNECTION_T *vchi_create_connection(const VCHI_CONNECTION_API_T *function_table, +const VCHI_MESSAGE_DRIVER_T *low_level); // Routine used to initialise the vchi on both local + remote connections extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); @@ -137,7 +137,7 @@ extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, VCHI_CRC_CONTROL_T control); // helper functions -extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); +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); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 1/4] staging: vc04_services: Fix "space prohibited"
This patch fixes the checkpatch.pl error: ERROR: space prohibited after/before that open/closed parenthesis in the interface/vchi directory. Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 106 +- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 66a3a060fad2..ffb8caaacaea 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -98,7 +98,7 @@ typedef struct vchi_msg_vector_ex { #define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } // Macros to manipulate 'FOURCC' values -#define MAKE_FOURCC(x) ((int32_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] )) +#define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) #define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF // Opaque service information @@ -154,25 +154,25 @@ 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 VCHI_CONNECTION_API_T * function_table, const VCHI_MESSAGE_DRIVER_T * low_level); // 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(VCHI_INSTANCE_T *instance_handle); -extern int32_t vchi_exit( void ); +extern int32_t vchi_exit(void); -extern int32_t vchi_connect( VCHI_CONNECTION_T **connections, +extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle ); + VCHI_INSTANCE_T 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(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking -extern int32_t vchi_crc_control( VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control ); +extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -183,32 +183,32 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); Global service API */ // Routine to create a named service -extern int32_t vchi_service_create( VCHI_INSTANCE_T instance_handle, +extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle ); +VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service -extern int32_t vchi_service_destroy( const VCHI_SERVICE_HANDLE_T 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(VCHI_INSTANCE_T instance_handle, SERVICE_CREATION_T *setup, VCHI_SERVICE_HANDLE_T *handle); -extern int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle, - short *peer_version ); +extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, + short *peer_version); // Routine to close a named service -extern int32_t vchi_service_close( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); // Routine to increment ref count on a named service -extern int32_t vchi_service_use( const VCHI_SERVICE_HANDLE_T handle ); +extern int32_t vchi_service_use(const VCHI_SERVICE_HANDLE_T handle); // Routine to decrement ref count on a named service -extern int32_t vchi_service_release( const VCHI_SERVICE_HANDLE_T handle ); +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, +extern int32_t vchi_service_set_option(cons
[PATCH v4 0/4] staging: vc04_services: Fix checkpatch.pl errors
This patchset fixes the following checkpatch.pl errors in the interface/vchi directory: ERROR: space prohibited after/before that open/closed parenthesis ERROR: code indent should use tabs where possible ERROR: space required after that ',' ERROR: Macros with complex values should be enclosed in parentheses ERROR: "foo * bar" should be "foo* bar" Aymen Qader (4): staging: vc04_services: Fix "space prohibited" staging: vc04_services: Use tabs instead of spaces staging: vc04_services: Remove unused macros staging: vc04_services: Remove spaces after '*' v2: Added cover letter correctly v3: Remove unused macros v4: Added patch changelog to cover letter .../vc04_services/interface/vchi/vchi.h | 208 +++--- .../vc04_services/interface/vchi/vchi_cfg.h | 2 +- 2 files changed, 86 insertions(+), 124 deletions(-) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 4/4] staging: vc04_services: Remove spaces after '*'
This patch fixes the checkpatch.pl error: ERROR: "foo * bar" should be "foo *bar" in the interface/vchi directory Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/interface/vchi/vchi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index f96676227ddc..3fe19d72b3ab 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -116,8 +116,8 @@ typedef struct service_info_tag { extern "C" { #endif -extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(const VCHI_CONNECTION_API_T * function_table, -const VCHI_MESSAGE_DRIVER_T * low_level); +extern /*@observer@*/ VCHI_CONNECTION_T *vchi_create_connection(const VCHI_CONNECTION_API_T *function_table, +const VCHI_MESSAGE_DRIVER_T *low_level); // Routine used to initialise the vchi on both local + remote connections extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); @@ -137,7 +137,7 @@ extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, VCHI_CRC_CONTROL_T control); // helper functions -extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); +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); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 3/4] staging: vc04_services: Remove unused macros
This patch removes the macros and structs associated with the "vchi_msg_queuev_ex" function, which was previously removed in 49bec49. Also fixes the checkpatch.pl errors: ERROR: Macros with complex values should be enclosed in parentheses ERROR: space required after that ',' Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 38 --- 1 file changed, 38 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index cb2582a4eb6a..f96676227ddc 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -60,46 +60,8 @@ struct vchi_version { #define VCHI_VERSION(v_) { v_, v_ } #define VCHI_VERSION_EX(v_, m_) { v_, m_ } -typedef enum { - VCHI_VEC_POINTER, - VCHI_VEC_HANDLE, - VCHI_VEC_LIST -} VCHI_MSG_VECTOR_TYPE_T; - -typedef struct vchi_msg_vector_ex { - - VCHI_MSG_VECTOR_TYPE_T type; - union { - // a memory handle - struct { - VCHI_MEM_HANDLE_T handle; - uint32_t offset; - int32_t vec_len; - } handle; - - // an ordinary data pointer - struct { - const void *vec_base; - int32_t vec_len; - } ptr; - - // a nested vector list - struct { - struct vchi_msg_vector_ex *vec; - uint32_t vec_len; - } list; - } u; -} VCHI_MSG_VECTOR_EX_T; - -// Construct an entry in a msg vector for a pointer (p) of length (l) -#define VCHI_VEC_POINTER(p,l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } - -// Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l) -#define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } - // Macros to manipulate 'FOURCC' values #define MAKE_FOURCC(x) ((int32_t)((x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3])) -#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF // Opaque service information struct opaque_vchi_service_t; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 2/4] staging: vc04_services: Use tabs instead of spaces
This patch fixes the checkpatch.pl error: ERROR: code indent should use tabs where possible in the interface/vchi directory Signed-off-by: Aymen Qader --- .../vc04_services/interface/vchi/vchi.h | 116 +- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index ffb8caaacaea..cb2582a4eb6a 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -71,23 +71,23 @@ typedef struct vchi_msg_vector_ex { VCHI_MSG_VECTOR_TYPE_T type; union { // a memory handle - struct { - VCHI_MEM_HANDLE_T handle; - uint32_t offset; - int32_t vec_len; - } handle; + struct { + VCHI_MEM_HANDLE_T handle; + uint32_t offset; + int32_t vec_len; + } handle; // an ordinary data pointer - struct { - const void *vec_base; - int32_t vec_len; + struct { + const void *vec_base; + int32_t vec_len; } ptr; // a nested vector list - struct { - struct vchi_msg_vector_ex *vec; - uint32_t vec_len; - } list; + struct { + struct vchi_msg_vector_ex *vec; + uint32_t vec_len; + } list; } u; } VCHI_MSG_VECTOR_EX_T; @@ -155,7 +155,7 @@ extern "C" { #endif extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection(const VCHI_CONNECTION_API_T * function_table, - const VCHI_MESSAGE_DRIVER_T * low_level); +const VCHI_MESSAGE_DRIVER_T * low_level); // Routine used to initialise the vchi on both local + remote connections extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); @@ -163,8 +163,8 @@ extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); extern int32_t vchi_exit(void); extern int32_t vchi_connect(VCHI_CONNECTION_T **connections, - const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle); + const uint32_t num_connections, + VCHI_INSTANCE_T instance_handle); //When this is called, ensure that all services have no data pending. //Bulk transfers can remain 'queued' @@ -172,7 +172,7 @@ extern int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle); // Global control over bulk CRC checking extern int32_t vchi_crc_control(VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control); + VCHI_CRC_CONTROL_T control); // helper functions extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); @@ -184,19 +184,19 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); */ // Routine to create a named service extern int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle, -SERVICE_CREATION_T *setup, -VCHI_SERVICE_HANDLE_T *handle); + SERVICE_CREATION_T *setup, + VCHI_SERVICE_HANDLE_T *handle); // Routine to destroy a service 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, - SERVICE_CREATION_T *setup, - VCHI_SERVICE_HANDLE_T *handle); +SERVICE_CREATION_T *setup, +VCHI_SERVICE_HANDLE_T *handle); extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, - short *peer_version); +short *peer_version); // Routine to close a named service extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); @@ -227,18 +227,18 @@ vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, // Routine to receive a msg from a service // Dequeue is equivalent to hold, copy into client buffer, release 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); + void *data, + uint32_t max_data_size_to_read, + uint32_t *actual_msg_size, + VCHI_FLAGS_T flags); // Routine to look at a messa
[PATCH] staging: vc04_services: Update TODO re: arm64
This patch removes the TODO item to remove manual cache flushing from b ulk_receieve - this was done in 7e8dbea. Also remove the unnecessary asm/cacheflush.h header. Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/bcm2835-camera/TODO | 6 -- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/TODO b/drivers/staging/vc04_services/bcm2835-camera/TODO index cefce72d814f..6c2b4ffe4996 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/TODO +++ b/drivers/staging/vc04_services/bcm2835-camera/TODO @@ -15,9 +15,3 @@ padding in the V4L2 spec, but that padding doesn't match what the hardware can do. If we exposed the native padding requirements through the V4L2 "multiplanar" formats, the firmware would have one less copy it needed to do. - -3) Port to ARM64 - -The bulk_receive() does some manual cache flushing that are 32-bit ARM -only, which we should convert to proper cross-platform APIs. - diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 51e5b04ff0f5..6e5c1d4ee122 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "mmal-common.h" -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: vc04_services: Update TODO re: arm64
Remove the TODO item to remove manual cache flushing from bulk_receive. This was previously done in this commit: (7e8dbdea) staging: bcm2835-camera: Remove explicit cache flush operations Also remove the unnecessary asm/cacheflush.h header. Signed-off-by: Aymen Qader --- v2: Make commit message clearer drivers/staging/vc04_services/bcm2835-camera/TODO | 6 -- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/TODO b/drivers/staging/vc04_services/bcm2835-camera/TODO index cefce72d814f..6c2b4ffe4996 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/TODO +++ b/drivers/staging/vc04_services/bcm2835-camera/TODO @@ -15,9 +15,3 @@ padding in the V4L2 spec, but that padding doesn't match what the hardware can do. If we exposed the native padding requirements through the V4L2 "multiplanar" formats, the firmware would have one less copy it needed to do. - -3) Port to ARM64 - -The bulk_receive() does some manual cache flushing that are 32-bit ARM -only, which we should convert to proper cross-platform APIs. - diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 51e5b04ff0f5..6e5c1d4ee122 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "mmal-common.h" -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/2] staging: bcm2835-camera: Clean up completed TODO
Update the bcm2835-camera driver to remove a TODO and an unused header include. These were made unnecessary in commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Aymen Qader (2): staging: bcm2835-camera: Update TODO staging: bcm2835-camera: Remove unused header -- v2: Make commit message clearer v3: Separate patch into two, clean up commit messages drivers/staging/vc04_services/bcm2835-camera/TODO | 6 -- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 1 - 2 files changed, 7 deletions(-) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/2] staging: bcm2835-camera: Remove unused header
Remove the asm/cacheflush.h header include from mmal-vchiq.c. This dependency was removed in: commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 51e5b04ff0f5..6e5c1d4ee122 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "mmal-common.h" -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/2] staging: bcm2835-camera: Remove unused header
Remove the asm/cacheflush.h header include from mmal-vchiq.c. This dependency was removed in: commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 51e5b04ff0f5..6e5c1d4ee122 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "mmal-common.h" -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/2] staging: bcm2835-camera: Update TODO
Remove the TODO item to remove manual cache flushing from bulk_receive. This was previously done in this commit: commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/bcm2835-camera/TODO | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/TODO b/drivers/staging/vc04_services/bcm2835-camera/TODO index cefce72d814f..6c2b4ffe4996 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/TODO +++ b/drivers/staging/vc04_services/bcm2835-camera/TODO @@ -15,9 +15,3 @@ padding in the V4L2 spec, but that padding doesn't match what the hardware can do. If we exposed the native padding requirements through the V4L2 "multiplanar" formats, the firmware would have one less copy it needed to do. - -3) Port to ARM64 - -The bulk_receive() does some manual cache flushing that are 32-bit ARM -only, which we should convert to proper cross-platform APIs. - -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/2] staging: bcm2835-camera: Clean up completed TODO
Update the bcm2835-camera driver to remove a TODO and an unused header include. These were made unnecessary in commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Aymen Qader (2): staging: bcm2835-camera: Update TODO staging: bcm2835-camera: Remove unused header -- v2: Make commit message clearer v3: Separate patch into two, clean up commit messages drivers/staging/vc04_services/bcm2835-camera/TODO | 6 -- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 1 - 2 files changed, 7 deletions(-) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/2] staging: bcm2835-camera: Update TODO
Remove the TODO item to remove manual cache flushing from bulk_receive. This was previously done in this commit: commit 7e8dbea41032 ("staging: bcm2835-camera: Remove explicit cache flush operations") Signed-off-by: Aymen Qader --- drivers/staging/vc04_services/bcm2835-camera/TODO | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/TODO b/drivers/staging/vc04_services/bcm2835-camera/TODO index cefce72d814f..6c2b4ffe4996 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/TODO +++ b/drivers/staging/vc04_services/bcm2835-camera/TODO @@ -15,9 +15,3 @@ padding in the V4L2 spec, but that padding doesn't match what the hardware can do. If we exposed the native padding requirements through the V4L2 "multiplanar" formats, the firmware would have one less copy it needed to do. - -3) Port to ARM64 - -The bulk_receive() does some manual cache flushing that are 32-bit ARM -only, which we should convert to proper cross-platform APIs. - -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Add null pointer check for skb
Add a null pointer check for the socket buffer in ks_hostif.c to avoid a possible null pointer deference. Signed-off-by: Aymen Qader --- drivers/staging/ks7010/ks_hostif.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 0e554e3359b5..4a5bc7858ef7 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1011,6 +1011,11 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) size_t size; int ret; + if(!skb) { + ret = -ENOMEM; + goto err_kfree; + } + skb_len = skb->len; if (skb_len > ETH_FRAME_LEN) { netdev_err(priv->net_dev, "bad length skb_len=%d\n", skb_len); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: ks7010: Add null pointer check for skb
Add a null pointer check for the socket buffer in ks_hostif.c to avoid a possible null pointer deference, and remove a later now-redundant null pointer check. Signed-off-by: Aymen Qader --- v2: Remove redundant pointer check drivers/staging/ks7010/ks_hostif.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 0e554e3359b5..fdfee760a54f 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1011,6 +1011,11 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) size_t size; int ret; + if(!skb) { + ret = -ENOMEM; + goto err_kfree; + } + skb_len = skb->len; if (skb_len > ETH_FRAME_LEN) { netdev_err(priv->net_dev, "bad length skb_len=%d\n", skb_len); @@ -1023,7 +1028,6 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) priv->wpa.mic_failure.stop) { if (netif_queue_stopped(priv->net_dev)) netif_wake_queue(priv->net_dev); - if (skb) dev_kfree_skb(skb); return 0; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: ks7010: Add null pointer check for skb
Add a null pointer check for the socket buffer in ks_hostif.c to avoid a possible null pointer deference, and remove a later now-redundant null pointer check. Signed-off-by: Aymen Qader --- v2: Remove redundant pointer check v3: Style fix drivers/staging/ks7010/ks_hostif.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 0e554e3359b5..95b6c7557e84 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1011,6 +1011,11 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) size_t size; int ret; + if (!skb) { + ret = -ENOMEM; + goto err_kfree; + } + skb_len = skb->len; if (skb_len > ETH_FRAME_LEN) { netdev_err(priv->net_dev, "bad length skb_len=%d\n", skb_len); @@ -1023,7 +1028,6 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) priv->wpa.mic_failure.stop) { if (netif_queue_stopped(priv->net_dev)) netif_wake_queue(priv->net_dev); - if (skb) dev_kfree_skb(skb); return 0; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8188eu: Avoid null pointer arithmetic
Avoid null pointer arithmetic in rtw_mlme_ext.c by skipping other field checks if the information element pointer is null. Signed-off-by: Aymen Qader --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 834053a0ae9d..8a3a71456cd0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -2971,8 +2971,10 @@ static unsigned int OnAssocReq(struct adapter *padapter, /* checking SSID */ p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len, pkt_len - WLAN_HDR_A3_LEN - ie_offset); - if (!p) + if (!p) { status = _STATS_FAILURE_; + goto OnAssocReqFail; + } if (ie_len == 0) { /* broadcast ssid, however it is not allowed in assocreq */ status = _STATS_FAILURE_; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: ks7010: Add null pointer check for skb
Retraction: in hindsight I see that with the current usage of this function, there is already a check for the socket buffer so this check is unnecessary. However, I'm not sure if it's considered good practice to keep this check anyway--in any case, ENOMEM isn't the right error to return. On Thu, Sep 27, 2018 at 04:16:13PM +0100, Aymen Qader wrote: > Add a null pointer check for the socket buffer in ks_hostif.c to avoid a > possible null pointer deference, and remove a later now-redundant null > pointer check. > > Signed-off-by: Aymen Qader > --- > v2: Remove redundant pointer check > v3: Style fix > > drivers/staging/ks7010/ks_hostif.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/ks7010/ks_hostif.c > b/drivers/staging/ks7010/ks_hostif.c > index 0e554e3359b5..95b6c7557e84 100644 > --- a/drivers/staging/ks7010/ks_hostif.c > +++ b/drivers/staging/ks7010/ks_hostif.c > @@ -1011,6 +1011,11 @@ int hostif_data_request(struct ks_wlan_private *priv, > struct sk_buff *skb) > size_t size; > int ret; > > + if (!skb) { > + ret = -ENOMEM; > + goto err_kfree; > + } > + > skb_len = skb->len; > if (skb_len > ETH_FRAME_LEN) { > netdev_err(priv->net_dev, "bad length skb_len=%d\n", skb_len); > @@ -1023,7 +1028,6 @@ int hostif_data_request(struct ks_wlan_private *priv, > struct sk_buff *skb) > priv->wpa.mic_failure.stop) { > if (netif_queue_stopped(priv->net_dev)) > netif_wake_queue(priv->net_dev); > - if (skb) > dev_kfree_skb(skb); > > return 0; > -- > 2.17.1 > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8188eu: Avoid null pointer arithmetic
On Thu, Sep 27, 2018 at 03:52:53PM -0500, Larry Finger wrote: > On 9/27/18 12:04 PM, Aymen Qader wrote: > > Avoid null pointer arithmetic in rtw_mlme_ext.c by skipping other field > > checks if the information element pointer is null. > > > > Signed-off-by: Aymen Qader > > --- > > drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > > b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > > index 834053a0ae9d..8a3a71456cd0 100644 > > --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > > +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > > @@ -2971,8 +2971,10 @@ static unsigned int OnAssocReq(struct adapter > > *padapter, > > /* checking SSID */ > > p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len, > > pkt_len - WLAN_HDR_A3_LEN - ie_offset); > > - if (!p) > > + if (!p) { > > status = _STATS_FAILURE_; > > + goto OnAssocReqFail; > > + } > > if (ie_len == 0) { /* broadcast ssid, however it is not allowed in > > assocreq */ > > status = _STATS_FAILURE_; > > I do not think this patch avoids any pointer arithmetic. If p is NULL, then > ie_len will be zero and the branch with the memcmp() call, where the pointer > arithmetic is done, will be skipped. I'm sincerely sorry, you're completely right--that was a bad oversight from me, I should have checked more thoroughly. > > That said, it is better to bail out with the first failure condition. I do > not require the following, but the code would be even simpler if you test p > and ie_len==0 in a single if statement and eliminate some code as in > > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > index 1115050077e4..71722cec84a0 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > @@ -2982,11 +2982,10 @@ static unsigned int OnAssocReq(struct adapter > *padapter, > /* checking SSID */ > p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, > &ie_len, > pkt_len - WLAN_HDR_A3_LEN - ie_offset); > - if (!p) > - status = _STATS_FAILURE_; > > - if (ie_len == 0) { /* broadcast ssid, however it is not allowed in > assocreq */ > + if (!p || ie_len == 0) { /* broadcast ssid, however it is not > allowed in assocreq */ > status = _STATS_FAILURE_; > + goto OnAssocReqFail; > } else { > /* check if ssid match */ > if (memcmp((void *)(p+2), cur->Ssid.Ssid, > cur->Ssid.SsidLength)) > Yep, I understand that would be a lot better. If it's alright, I'll send this in with a v2 (w/ a more appropriate commit message). > > ACKed-by: Larry Finger > > Thanks, > > Larry > Kind regards, Aymen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: rtl8188eu: Skip unnecessary field checks
Skip unnecessary request field checks when the information element pointer is null. Signed-off-by: Aymen Qader --- v2: combine pointer check and length check & change commit message to be more appropriate drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 834053a0ae9d..4d55bbdf8fb7 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -2971,11 +2971,11 @@ static unsigned int OnAssocReq(struct adapter *padapter, /* checking SSID */ p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len, pkt_len - WLAN_HDR_A3_LEN - ie_offset); - if (!p) - status = _STATS_FAILURE_; - if (ie_len == 0) { /* broadcast ssid, however it is not allowed in assocreq */ + if (!p || ie_len == 0) { + /* broadcast ssid, however it is not allowed in assocreq */ status = _STATS_FAILURE_; + goto OnAssocReqFail; } else { /* check if ssid match */ if (memcmp((void *)(p+2), cur->Ssid.Ssid, cur->Ssid.SsidLength)) -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8723bs: Skip unnecessary field checks
Skip unnecessary request field checks when the information element pointer is null. Signed-off-by: Aymen Qader --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index bf055935ef65..69c7abc0e3a5 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -1267,13 +1267,12 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame) /* checking SSID */ p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len, pkt_len - WLAN_HDR_A3_LEN - ie_offset); - if (p == NULL) { - status = _STATS_FAILURE_; - } - if (ie_len == 0) /* broadcast ssid, however it is not allowed in assocreq */ + if (!p || ie_len == 0) { + /* broadcast ssid, however it is not allowed in assocreq */ status = _STATS_FAILURE_; - else { + goto OnAssocReqFail; + } else { /* check if ssid match */ if (memcmp((void *)(p+2), cur->Ssid.Ssid, cur->Ssid.SsidLength)) status = _STATS_FAILURE_; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] staging: ks7010: Add null pointer check for skb
On Fri, Sep 28, 2018 at 11:13:25AM +0300, Dan Carpenter wrote: > You might want to try running Smatch on your patches. This is the > second one where maybe the results would have been interesting. > > git clone http://repo.or.cz/w/smatch.git > cd smatch > make > cd ~/kernel/src/ > ~/smatch/smatch_scripts/kchecker drivers/staging/ks7010/ks_hostif.c > > This patch introduced a problem, but the earlier one fixed a potential > problem in rtl8723bs: > > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1274 OnAssocReq() error: > uninitialized symbol 'ie_len'. > > Unfortunately, Smatch missed the potential NULL dereference in > OnAssocReq()... It wouldn't be that hard to fix... > > regards, > dan carpenter Oh thanks, I've not used Smatch before--that's really helpful, I'm going to use that a lot in the future. On Fri, Sep 28, 2018 at 11:16:01AM +0300, Dan Carpenter wrote: > Btw, if you have the cross function DB built then Smatch says that the > NULL check can be removed here no problem. > > $ smdb hostif_data_request > [ snip ] > drivers/staging/ks7010/ks_wlan_net.c | ks_wlan_start_xmit | > hostif_data_request | PARAM_VALUE | 1 | skb | s64min-(-1),1-s64max > > regards, > dan carpenter > Again, thanks very much! That's really cool, Smatch looks like a great tool, I wish I found it before! On Fri, Sep 28, 2018 at 11:22:39AM +0300, Dan Carpenter wrote: > On Thu, Sep 27, 2018 at 07:04:43PM +0100, Aymen Qader wrote: > > Retraction: in hindsight I see that with the current usage of this > > function, there is already a check for the socket buffer so this check > > is unnecessary. However, I'm not sure if it's considered good practice > > to keep this check anyway--in any case, ENOMEM isn't the right error > > to return. > > When we find inconsistent NULL checks then we fix it to make sense. > Generally, we prefer a minimal style, with no extra code for future > proofing. (The future seldom goes the way you expect and those extra > NULL checks would be easy to add back). Hm I understand, so if a parameter can currently never be null there's no need to add unnecessary checks for in case that changes in the future. I'll be sure to keep that in mind from now on. > > So, yes, do remove the NULL check but also fix the indenting while > you're at it. > > Take your time to write patches. I write them, then I sit on them over > night then I send them in the morning. It means that sometimes other > people have already sent it but that's fine. If you have to redo a > patch then don't send the v2 patch on the same day. v2 patches are > stressful and you imagine that everyone is waiting for you to send it > or something. We are not waiting for you. We don't care if you wait > until next week to send these... > > So when you write a v2 patch wait until the next day to send it. Then > you will be calm when you review it. > > regards, > dan carpenter > Thank you very much for all of these tips, I really appreciate you taking the time. I'm definitely going to try and apply this philosophy in the future, I think I've been too impulsive with my patches so far. I've been thinking "oh no, I made a mistake--I need to quickly send a v2!" and then end up making even more mistakes, so I completely understand what you mean. Thanks again. Kind regards, Aymen Qader ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtlwifi: Return -ENOMEM instead of -1
Use the ENOMEM constant instead of -1 for kzalloc failure checks in rtl_halmac.c Signed-off-by: Aymen Qader --- drivers/staging/rtlwifi/halmac/rtl_halmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c index f0c6fc8c6aca..7bfc9620479a 100644 --- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c +++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c @@ -209,7 +209,7 @@ static int init_halmac_event_with_waittime(struct rtl_priv *rtlpriv, if (!rtlpriv->halmac.indicator[id].comp) { comp = kzalloc(sizeof(*comp), GFP_KERNEL); if (!comp) - return -1; + return -ENOMEM; } else { RT_TRACE(rtlpriv, COMP_HALMAC, DBG_LOUD, "%s: id(%d) sctx is not NULL!!\n", __func__, @@ -359,7 +359,7 @@ static int init_priv(struct rtl_halmac *halmac) size = sizeof(*indicator) * count; indicator = kzalloc(size, GFP_KERNEL); if (!indicator) - return -1; + return -ENOMEM; halmac->indicator = indicator; return 0; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: sm750fb: Remove extra space character
Remove an extra space in ddk750_mode.c to fix indentation Signed-off-by: Aymen Qader --- drivers/staging/sm750fb/ddk750_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index 7e22d093b091..4dac691ad1b1 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -131,7 +131,7 @@ static int programModeRegisters(struct mode_parameter *pModeParam, DISPLAY_CTRL_HSYNC_PHASE | DISPLAY_CTRL_TIMING | DISPLAY_CTRL_PLANE); -poke32(CRT_DISPLAY_CTRL, tmp | reg); + poke32(CRT_DISPLAY_CTRL, tmp | reg); } } else if (pll->clockType == PRIMARY_PLL) { -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: Remove unnecessary null check
Remove the unnecessary socket buffer null check in hostif_data_request. There is already an appropriate null check in the calling function: (ks_wlan_net.c) ks_wlan_start_xmit Signed-off-by: Aymen Qader --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 0e554e3359b5..ca030d3f609f 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1023,8 +1023,8 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) priv->wpa.mic_failure.stop) { if (netif_queue_stopped(priv->net_dev)) netif_wake_queue(priv->net_dev); - if (skb) - dev_kfree_skb(skb); + + dev_kfree_skb(skb); return 0; } -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel