Re: [PATCH 1/2] staging: vc04_services: mmal-vchiq: Do not assign bool to u32
From: Dan Carpenter
Date: Thu Nov 17 2022 - 08:43:25 EST
On Thu, Nov 17, 2022 at 06:29:52PM +0530, Umang Jain wrote:
> From: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
>
> struct vchiq_mmal_component.enabled is a u32 type. Do not assign
> it a bool.
It's not a u32 type so this is wrong.
u32 enabled:1;
But also "true" is better than "1" in terms of a human reading the code.
Perhaps this is from a static checker? I am also the author of a checker
tool so I know how stupid they can be. When the checker says something
dumb, then the correct response is to be be briefly amused and not to
slavishly obey it.
regards,
dan