Re: [PATCH 2/2] staging: vc04_services: mmal-common: Do not use bool in structures

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

 



On Thu, Nov 17, 2022 at 06:29:53PM +0530, Umang Jain wrote:
> Do not use bool in structures, it already gets flagged by checkpatch:
> 
> "Avoid using bool structure members because of possible alignment issues"
> 
> Hence, modify struct mmal_fmt.remove_padding to use u32. No change in
> assignments as 0/1 are already being used with mmal_fmt.remove_padding.
> 
> Signed-off-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx>
> ---
>  drivers/staging/vc04_services/vchiq-mmal/mmal-common.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-common.h b/drivers/staging/vc04_services/vchiq-mmal/mmal-common.h
> index b33129403a30..fd02440f41b2 100644
> --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-common.h
> +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-common.h
> @@ -32,9 +32,9 @@ struct mmal_fmt {
>  	int depth;
>  	u32 mmal_component;  /* MMAL component index to be used to encode */
>  	u32 ybbp;            /* depth of first Y plane for planar formats */
> -	bool remove_padding;   /* Does the GPU have to remove padding,
> -				* or can we do hide padding via bytesperline.
> -				*/
> +	u32 remove_padding;  /* Does the GPU have to remove padding,
> +			      * or can we do hide padding via bytesperline.
> +			      */

checkpatch is wrong here, bool is correct to use and is just fine.

thanks,

greg k-h




[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