[0/3] vc04_services: Promote bool usage

Message ID 20221117160015.344528-1-umang.jain@ideasonboard.com
Headers
Series vc04_services: Promote bool usage |

Message

Umang Jain Nov. 17, 2022, 4 p.m. UTC
  In commit 7967656ffbfa ("coding-style: Clarify the expectations around
bool") the check to dis-allow bool structure members was removed from
checkpatch.pl. It promotes bool structure members to store boolean
values. This enhances code readability.

Umang Jain (3):
  Revert "staging: mmal-vchiq: Avoid use of bool in structures"
  vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use
  vc04_services: bcm2835-camera: Use bool values for
    mmal_fmt.remove_padding

 .../bcm2835-camera/bcm2835-camera.c           | 30 +++++++++----------
 .../vc04_services/vchiq-mmal/mmal-vchiq.c     | 18 +++++------
 .../vc04_services/vchiq-mmal/mmal-vchiq.h     |  6 ++--
 3 files changed, 27 insertions(+), 27 deletions(-)
  

Comments

Stefan Wahren Nov. 17, 2022, 6:11 p.m. UTC | #1
Hi Dave,

Am 17.11.22 um 17:00 schrieb Umang Jain:
> In commit 7967656ffbfa ("coding-style: Clarify the expectations around
> bool") the check to dis-allow bool structure members was removed from
> checkpatch.pl. It promotes bool structure members to store boolean
> values. This enhances code readability.
>
> Umang Jain (3):
>    Revert "staging: mmal-vchiq: Avoid use of bool in structures"
>    vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use
>    vc04_services: bcm2835-camera: Use bool values for
>      mmal_fmt.remove_padding
>
>   .../bcm2835-camera/bcm2835-camera.c           | 30 +++++++++----------
>   .../vc04_services/vchiq-mmal/mmal-vchiq.c     | 18 +++++------
>   .../vc04_services/vchiq-mmal/mmal-vchiq.h     |  6 ++--
could you please check these changes to be safe? I'm not sure that the 
affected declarations are really internal. I'm afraid this might affect 
firmware or userspace.
>   3 files changed, 27 insertions(+), 27 deletions(-)
>
  
Dan Carpenter Nov. 18, 2022, 8:47 a.m. UTC | #2
On Thu, Nov 17, 2022 at 07:11:41PM +0100, Stefan Wahren wrote:
> Hi Dave,
> 
> Am 17.11.22 um 17:00 schrieb Umang Jain:
> > In commit 7967656ffbfa ("coding-style: Clarify the expectations around
> > bool") the check to dis-allow bool structure members was removed from
> > checkpatch.pl. It promotes bool structure members to store boolean
> > values. This enhances code readability.
> > 
> > Umang Jain (3):
> >    Revert "staging: mmal-vchiq: Avoid use of bool in structures"
> >    vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use
> >    vc04_services: bcm2835-camera: Use bool values for
> >      mmal_fmt.remove_padding
> > 
> >   .../bcm2835-camera/bcm2835-camera.c           | 30 +++++++++----------
> >   .../vc04_services/vchiq-mmal/mmal-vchiq.c     | 18 +++++------
> >   .../vc04_services/vchiq-mmal/mmal-vchiq.h     |  6 ++--
> could you please check these changes to be safe? I'm not sure that the
> affected declarations are really internal. I'm afraid this might affect
> firmware or userspace.

The structs have a bunch of kernel pointers in them so hopefully they
are internal.  Otherwise we have a different sort of problem.

regards,
dan carpenter
  
Dave Stevenson Nov. 18, 2022, 5:25 p.m. UTC | #3
Hi Stefan

On Thu, 17 Nov 2022 at 18:11, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> Hi Dave,
>
> Am 17.11.22 um 17:00 schrieb Umang Jain:
> > In commit 7967656ffbfa ("coding-style: Clarify the expectations around
> > bool") the check to dis-allow bool structure members was removed from
> > checkpatch.pl. It promotes bool structure members to store boolean
> > values. This enhances code readability.
> >
> > Umang Jain (3):
> >    Revert "staging: mmal-vchiq: Avoid use of bool in structures"
> >    vc04_services: mmal-vchiq: Use bool for vchiq_mmal_component.in_use
> >    vc04_services: bcm2835-camera: Use bool values for
> >      mmal_fmt.remove_padding
> >
> >   .../bcm2835-camera/bcm2835-camera.c           | 30 +++++++++----------
> >   .../vc04_services/vchiq-mmal/mmal-vchiq.c     | 18 +++++------
> >   .../vc04_services/vchiq-mmal/mmal-vchiq.h     |  6 ++--
> could you please check these changes to be safe? I'm not sure that the
> affected declarations are really internal. I'm afraid this might affect
> firmware or userspace.

No problem. These are totally safe.
As I've commented on the v2 patch, if it were in the mmal-msg*.h files
then I'd be more concerned as those are matching the firmware
structures, but these are just internal state.

  Dave

> >   3 files changed, 27 insertions(+), 27 deletions(-)
> >