staging: vc04_services: Remove unnecessary braces
Subsystems (2)
PATCH 1/1 staging: vc04_services: Remove unnecessary braces
Remove unnecessary braces for single statements.
--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +0 -4
@@ -209,9 +209,7 @@ vchiq_platform_init_state(VCHIQ_STATE_T *state) ((struct vchiq_2835_state *)state->platform_state)->inited =1 ; status =vchiq_arm_init_state (state, &((struct vchiq_2835_state *)state->platform_state)->arm_state);if (status !=VCHIQ_SUCCESS ) - { ((struct vchiq_2835_state *)state->platform_state)->inited =0 ; - }return status; }
@@ -219,9 +217,7 @@ VCHIQ_ARM_STATE_T* vchiq_platform_get_arm_state(VCHIQ_STATE_T *state) {if (!((struct vchiq_2835_state *)state->platform_state)->inited) - {BUG (); - }return &((struct vchiq_2835_state *)state->platform_state)->arm_state; }
Signature · 1 line
2.7.4
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c vchiq_platform_init_state(VCHIQ_STATE_T *state) · line 209
Quoted 13 lines · Mihaela Muraru
Remove unnecessary braces for single statements.
Signed-off-by Mihaela Muraru <[email protected]>--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ---- 1 file changed, 4 deletions(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +0
-0@@ -209,9 +209,7 @@ vchiq_platform_init_state(VCHIQ_STATE_T *state) ((struct vchiq_2835_state *)state->platform_state)->inited =1 ;
These casts are not very nice, and having them over and over is worse. Maybe you could introduce a local variable with the right type.
julia
Quoted 28 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +0
-5status =vchiq_arm_init_state (state, &((struct vchiq_2835_state *)state->platform_state)->arm_state);if (status !=VCHIQ_SUCCESS ) - { ((struct vchiq_2835_state *)state->platform_state)->inited =0 ; - }return status; }@@ -219,9 +217,7 @@ VCHIQ_ARM_STATE_T* vchiq_platform_get_arm_state(VCHIQ_STATE_T *state) {if (!((struct vchiq_2835_state *)state->platform_state)->inited) - {BUG (); - }return &((struct vchiq_2835_state *)state->platform_state)->arm_state; } --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/20171014084535.GA3681%40domino-MS-16Y1.
For more options, visit https://groups.google.com/d/optout.
Quoted 21 lines · Julia Lawall
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c vchiq_platform_init_state(VCHIQ_STATE_T *state) · line 209
Quoted 13 lines · Mihaela Muraru
Remove unnecessary braces for single statements.
Signed-off-by Mihaela Muraru <[email protected]>--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ---- 1 file changed, 4 deletions(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +0
-0@@ -209,9 +209,7 @@ vchiq_platform_init_state(VCHIQ_STATE_T *state) ((struct vchiq_2835_state *)state->platform_state)->inited =1 ;These casts are not very nice, and having them over and over is worse. Maybe you could introduce a local variable with the right type.
Quoted 1 line
julia
Thank you,
I take care of that.
Mihaela
Quoted 28 lines
Quoted 28 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +0
-5status =vchiq_arm_init_state (state, &((struct vchiq_2835_state *)state->platform_state)->arm_state);if (status !=VCHIQ_SUCCESS ) - { ((struct vchiq_2835_state *)state->platform_state)->inited =0 ; - }return status; }@@ -219,9 +217,7 @@ VCHIQ_ARM_STATE_T* vchiq_platform_get_arm_state(VCHIQ_STATE_T *state) {if (!((struct vchiq_2835_state *)state->platform_state)->inited) - {BUG (); - }return &((struct vchiq_2835_state *)state->platform_state)->arm_state; } --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/20171014084535.GA3681%40domino-MS-16Y1.
For more options, visit https://groups.google.com/d/optout.