Message ID | 20221117125953.88441-3-umang.jain@ideasonboard.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | vc04_services: vchiq-mmal: Drop bool usage | expand |
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@ideasonboard.com> > --- > 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
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" > This checkpatch warning was removed almost 4 years ago. regards, dan carpenter
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. + */ }; /* buffer for one video frame */
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@ideasonboard.com> --- drivers/staging/vc04_services/vchiq-mmal/mmal-common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)