Re: [PATCH 1/2] staging: vc04_services: mmal-vchiq: Do not assign bool to u32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux