staging: vc04_services: clean up anonymous field declarations
Subsystems (3)
cover staging: vc04_services: clean up anonymous field declarations
This patchset replaces anonymous field declarations for the typedef SERVICE_CREATION_T with explicit field declarations in the drivers bcm2835-audio and bcm2835-camera.
typedef struct {
struct vchi_version version;
int32_t service_id;
VCHI_CONNECTION_T *connection;
uint32_t rx_fifo_size;
uint32_t tx_fifo_size;
VCHI_CALLBACK_T callback;
void *callback_param;
/* client intends to receive bulk transfers of
odd lengths or into unaligned buffers */
int32_t want_unaligned_bulk_rx;
/* client intends to transmit bulk transfers of
odd lengths or out of unaligned buffers */
int32_t want_unaligned_bulk_tx;
/* client wants to check CRCs on (bulk) xfers.
Only needs to be set at 1 end - will do both directions. */
int32_t want_crc;
} SERVICE_CREATION_T;** HERE ***
Aishwarya Pant (2):
staging: bcm2835-audio: remove anonymous field declarations
staging: bcm2835-camera: remove anonymous field declarations
.../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 20 ++++++++++---------- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 staging: bcm2835-audio: remove anonymous field declarations
Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef SERVICE_CREATION_T in vc_vchi_audio_init(..)
--- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +10 -10
@@ -302,16 +302,16 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,/* Open the VCHI service connections */ for (i =0 ; i < num_connections; i++) {SERVICE_CREATION_T params = { -VCHI_VERSION_EX (VC_AUDIOSERV_VER ,VC_AUDIOSERV_MIN_VER ), -VC_AUDIO_SERVER_NAME ,// 4cc service code - vchi_connections[i],// passed in fn pointers -0 ,// rx fifo size (unused) -0 ,// tx fifo size (unused) - audio_vchi_callback,// service callback - instance,// service callback parameter -1 ,//TODO: remove VCOS_FALSE, // unaligned bulk receives -1 ,//TODO: remove VCOS_FALSE, // unaligned bulk transmits -0 // want crc check on bulk transfers + .version =VCHI_VERSION_EX (VC_AUDIOSERV_VER ,VC_AUDIOSERV_MIN_VER ), + .service_id =VC_AUDIO_SERVER_NAME , + .connection = vchi_connections[i], + .rx_fifo_size =0 , + .tx_fifo_size =0 , + .callback = audio_vchi_callback, + .callback_param = instance, + .want_unaligned_bulk_rx =1 ,//TODO: remove VCOS_FALSE + .want_unaligned_bulk_tx =1 ,//TODO: remove VCOS_FALSE + .want_crc =0 };LOG_DBG ("%s: about to open %i\n" , __func__, i);
Signature · 1 line
2.7.4
Re: [Outreachy kernel] [PATCH 1/2] staging: bcm2835-audio: remove anonymous field declarations
Quoted 18 lines · Aishwarya Pant
Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef
SERVICE_CREATION_Tinvc_vchi_audio_init(..)Signed-off-by Aishwarya Pant <[email protected]>--- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +0
-1@@ -302,16 +302,16 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,/* Open the VCHI service connections */ for (i =0 ; i < num_connections; i++) {SERVICE_CREATION_T params = { -VCHI_VERSION_EX (VC_AUDIOSERV_VER ,VC_AUDIOSERV_MIN_VER ),
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance, · line 305
Quoted 10 lines
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +1
-9-VC_AUDIO_SERVER_NAME ,// 4cc service code - vchi_connections[i],// passed in fn pointers -0 ,// rx fifo size (unused) -0 ,// tx fifo size (unused) - audio_vchi_callback,// service callback - instance,// service callback parameter -1 ,//TODO: remove VCOS_FALSE, // unaligned bulk receives -1 ,//TODO: remove VCOS_FALSE, // unaligned bulk transmits -0 // want crc check on bulk transfers + .version = VCHI_VERSION_EX(VC_AUDIOSERV_VER, VC_AUDIOSERV_MIN_VER),
Maybe this line could be adjusted to fit into 80 columns.
julia
Quoted 22 lines
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +9
-1+ .service_id = VC_AUDIO_SERVER_NAME, + .connection = vchi_connections[i], + .rx_fifo_size = 0, + .tx_fifo_size = 0, + .callback = audio_vchi_callback, + .callback_param = instance, + .want_unaligned_bulk_rx = 1, //TODO: remove VCOS_FALSE + .want_unaligned_bulk_tx = 1, //TODO: remove VCOS_FALSE + .want_crc = 0 };LOG_DBG ("%s: about to open %i\n" , __func__, i); --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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/7056e45a158a780d25a956b61e7dcc444e62c002.1489163547.git.aishpant%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
PATCH 2/2 staging: bcm2835-camera: remove anonymous field declarations
In reply to Aishwarya PantAnonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef SERVICE_CREATION_T in vchiq_mmal_init(..)
--- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +10 -10
@@ -1977,16 +1977,16 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)static VCHI_CONNECTION_T *vchi_connection;static VCHI_INSTANCE_T vchi_instance;SERVICE_CREATION_T params = { -VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), -VC_MMAL_SERVER_NAME , - vchi_connection, -0 ,/* rx fifo size (unused) */ -0 ,/* tx fifo size (unused) */ - service_callback, -NULL ,/* service callback parameter */ -1 ,/* unaligned bulk receives */ -1 ,/* unaligned bulk transmits */ -0 /* want crc check on bulk transfers */ + .version =VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), + .service_id =VC_MMAL_SERVER_NAME , + .connection = vchi_connection, + .rx_fifo_size =0 , + .tx_fifo_size =0 , + .callback = service_callback, + .callback_param =NULL , + .want_unaligned_bulk_rx =1 , + .want_unaligned_bulk_tx =1 , + .want_crc =0 };/* compile time checks to ensure structure size as they are
Signature · 1 line
2.7.4
Re: [Outreachy kernel] [PATCH 2/2] staging: bcm2835-camera: remove anonymous field declarations
Quoted 3 lines · Aishwarya Pant
Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef
SERVICE_CREATION_Tinvchiq_mmal_init(..)
Were you able to compile this file?
julia
Quoted 47 lines
Signed-off-by Aishwarya Pant <[email protected]>--- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +10
-11@@ -1977,16 +1977,16 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)static VCHI_CONNECTION_T *vchi_connection;static VCHI_INSTANCE_T vchi_instance;SERVICE_CREATION_T params = { -VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), -VC_MMAL_SERVER_NAME , - vchi_connection, -0 ,/* rx fifo size (unused) */ -0 ,/* tx fifo size (unused) */ - service_callback, -NULL ,/* service callback parameter */ -1 ,/* unaligned bulk receives */ -1 ,/* unaligned bulk transmits */ -0 /* want crc check on bulk transfers */ + .version =VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), + .service_id =VC_MMAL_SERVER_NAME , + .connection = vchi_connection, + .rx_fifo_size =0 , + .tx_fifo_size =0 , + .callback = service_callback, + .callback_param =NULL , + .want_unaligned_bulk_rx =1 , + .want_unaligned_bulk_tx =1 , + .want_crc =0 };/* compile time checks to ensure structure size as they are -- 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/a7acfee24fab685d28cc5bb088b2fe4288a4aa81.1489163547.git.aishpant%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 2/2] staging: bcm2835-camera: remove anonymous field declarations
Quoted 7 lines · Julia Lawall
Quoted 3 lines · Aishwarya Pant
Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef
SERVICE_CREATION_Tinvchiq_mmal_init(..)Were you able to compile this file?
I delete the *.o files from the drivers and compiled them with the allyesconfig. No errors.
Quoted 50 lines
julia
Quoted 47 lines
Signed-off-by Aishwarya Pant <[email protected]>--- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +10
-11@@ -1977,16 +1977,16 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)static VCHI_CONNECTION_T *vchi_connection;static VCHI_INSTANCE_T vchi_instance;SERVICE_CREATION_T params = { -VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), -VC_MMAL_SERVER_NAME , - vchi_connection, -0 ,/* rx fifo size (unused) */ -0 ,/* tx fifo size (unused) */ - service_callback, -NULL ,/* service callback parameter */ -1 ,/* unaligned bulk receives */ -1 ,/* unaligned bulk transmits */ -0 /* want crc check on bulk transfers */ + .version =VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), + .service_id =VC_MMAL_SERVER_NAME , + .connection = vchi_connection, + .rx_fifo_size =0 , + .tx_fifo_size =0 , + .callback = service_callback, + .callback_param =NULL , + .want_unaligned_bulk_rx =1 , + .want_unaligned_bulk_tx =1 , + .want_crc =0 };/* compile time checks to ensure structure size as they are -- 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/a7acfee24fab685d28cc5bb088b2fe4288a4aa81.1489163547.git.aishpant%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 2/2] staging: bcm2835-camera: remove anonymous field declarations
Quoted 11 lines · Aishwarya Pant
Quoted 7 lines · Julia Lawall
Quoted 3 lines · Aishwarya Pant
Anonymous field declarations are error prone. This patch replaces anonymous declarations with explicit field declarations for typedef
SERVICE_CREATION_Tinvchiq_mmal_init(..)Were you able to compile this file?
I delete the *.o files from the drivers and compiled them with the allyesconfig. No errors.
OK, a git pull was needed on my side :)
julia
Quoted 59 lines
Quoted 44 lines
julia
Quoted 40 lines
Signed-off-by Aishwarya Pant <[email protected]>--- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +10
-11@@ -1977,16 +1977,16 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance)static VCHI_CONNECTION_T *vchi_connection;static VCHI_INSTANCE_T vchi_instance;SERVICE_CREATION_T params = { -VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), -VC_MMAL_SERVER_NAME , - vchi_connection, -0 ,/* rx fifo size (unused) */ -0 ,/* tx fifo size (unused) */ - service_callback, -NULL ,/* service callback parameter */ -1 ,/* unaligned bulk receives */ -1 ,/* unaligned bulk transmits */ -0 /* want crc check on bulk transfers */ + .version =VCHI_VERSION_EX (VC_MMAL_VER ,VC_MMAL_MIN_VER ), + .service_id =VC_MMAL_SERVER_NAME , + .connection = vchi_connection, + .rx_fifo_size =0 , + .tx_fifo_size =0 , + .callback = service_callback, + .callback_param =NULL , + .want_unaligned_bulk_rx =1 , + .want_unaligned_bulk_tx =1 , + .want_crc =0 };/* compile time checks to ensure structure size as they are -- 2.7.4
Quoted 7 lines
Quoted 7 lines
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/a7acfee24fab685d28cc5bb088b2fe4288a4aa81.1489163547.git.aishpant%40gmail.com.
For more options, visit https://groups.google.com/d/optout.--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170310170823.GA6474%40aishwarya.
For more options, visit https://groups.google.com/d/optout.
Quoted 24 lines · Aishwarya Pant
This patchset replaces anonymous field declarations for the typedef
SERVICE_CREATION_Twith explicit field declarations in the drivers bcm2835-audio and bcm2835-camera.typedef struct { struct vchi_version version; int32_t service_id; VCHI_CONNECTION_T *connection; uint32_t rx_fifo_size; uint32_t tx_fifo_size; VCHI_CALLBACK_T callback; void *callback_param; /* client intends to receive bulk transfers of odd lengths or into unaligned buffers */ int32_t want_unaligned_bulk_rx; /* client intends to transmit bulk transfers of odd lengths or out of unaligned buffers */ int32_t want_unaligned_bulk_tx; /* client wants to check CRCs on (bulk) xfers. Only needs to be set at 1 end - will do both directions. */ int32_t want_crc; } SERVICE_CREATION_T;
Quoted 1 line
** HERE ***
I don't think this line is needed.
julia
Quoted 19 lines
Aishwarya Pant (2):
staging: bcm2835-audio: remove anonymous field declarations
staging: bcm2835-camera: remove anonymous field declarations.../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 20 ++++++++++---------- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-)--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1489163547.git.aishpant%40gmail.com.
For more options, visit https://groups.google.com/d/optout.