Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vc04_services: bcm2835-camera: Use bool values for mmal_fmt.remove_padding

mmal_fmt.remove_padding is defined as a boolean type hence, use boolean
values for it instead of 0/1 integers. This enhances code readability.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Link: https://lore.kernel.org/r/20221118084244.199909-4-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Umang Jain and committed by
Greg Kroah-Hartman
f198d347 c0012a39

+15 -15
+15 -15
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
··· 87 87 .depth = 12, 88 88 .mmal_component = COMP_CAMERA, 89 89 .ybbp = 1, 90 - .remove_padding = 1, 90 + .remove_padding = true, 91 91 }, { 92 92 .fourcc = V4L2_PIX_FMT_YUYV, 93 93 .mmal = MMAL_ENCODING_YUYV, 94 94 .depth = 16, 95 95 .mmal_component = COMP_CAMERA, 96 96 .ybbp = 2, 97 - .remove_padding = 0, 97 + .remove_padding = false, 98 98 }, { 99 99 .fourcc = V4L2_PIX_FMT_RGB24, 100 100 .mmal = MMAL_ENCODING_RGB24, 101 101 .depth = 24, 102 102 .mmal_component = COMP_CAMERA, 103 103 .ybbp = 3, 104 - .remove_padding = 0, 104 + .remove_padding = false, 105 105 }, { 106 106 .fourcc = V4L2_PIX_FMT_JPEG, 107 107 .flags = V4L2_FMT_FLAG_COMPRESSED, ··· 109 109 .depth = 8, 110 110 .mmal_component = COMP_IMAGE_ENCODE, 111 111 .ybbp = 0, 112 - .remove_padding = 0, 112 + .remove_padding = false, 113 113 }, { 114 114 .fourcc = V4L2_PIX_FMT_H264, 115 115 .flags = V4L2_FMT_FLAG_COMPRESSED, ··· 117 117 .depth = 8, 118 118 .mmal_component = COMP_VIDEO_ENCODE, 119 119 .ybbp = 0, 120 - .remove_padding = 0, 120 + .remove_padding = false, 121 121 }, { 122 122 .fourcc = V4L2_PIX_FMT_MJPEG, 123 123 .flags = V4L2_FMT_FLAG_COMPRESSED, ··· 125 125 .depth = 8, 126 126 .mmal_component = COMP_VIDEO_ENCODE, 127 127 .ybbp = 0, 128 - .remove_padding = 0, 128 + .remove_padding = false, 129 129 }, { 130 130 .fourcc = V4L2_PIX_FMT_YVYU, 131 131 .mmal = MMAL_ENCODING_YVYU, 132 132 .depth = 16, 133 133 .mmal_component = COMP_CAMERA, 134 134 .ybbp = 2, 135 - .remove_padding = 0, 135 + .remove_padding = false, 136 136 }, { 137 137 .fourcc = V4L2_PIX_FMT_VYUY, 138 138 .mmal = MMAL_ENCODING_VYUY, 139 139 .depth = 16, 140 140 .mmal_component = COMP_CAMERA, 141 141 .ybbp = 2, 142 - .remove_padding = 0, 142 + .remove_padding = false, 143 143 }, { 144 144 .fourcc = V4L2_PIX_FMT_UYVY, 145 145 .mmal = MMAL_ENCODING_UYVY, 146 146 .depth = 16, 147 147 .mmal_component = COMP_CAMERA, 148 148 .ybbp = 2, 149 - .remove_padding = 0, 149 + .remove_padding = false, 150 150 }, { 151 151 .fourcc = V4L2_PIX_FMT_NV12, 152 152 .mmal = MMAL_ENCODING_NV12, 153 153 .depth = 12, 154 154 .mmal_component = COMP_CAMERA, 155 155 .ybbp = 1, 156 - .remove_padding = 1, 156 + .remove_padding = true, 157 157 }, { 158 158 .fourcc = V4L2_PIX_FMT_BGR24, 159 159 .mmal = MMAL_ENCODING_BGR24, 160 160 .depth = 24, 161 161 .mmal_component = COMP_CAMERA, 162 162 .ybbp = 3, 163 - .remove_padding = 0, 163 + .remove_padding = false, 164 164 }, { 165 165 .fourcc = V4L2_PIX_FMT_YVU420, 166 166 .mmal = MMAL_ENCODING_YV12, 167 167 .depth = 12, 168 168 .mmal_component = COMP_CAMERA, 169 169 .ybbp = 1, 170 - .remove_padding = 1, 170 + .remove_padding = true, 171 171 }, { 172 172 .fourcc = V4L2_PIX_FMT_NV21, 173 173 .mmal = MMAL_ENCODING_NV21, 174 174 .depth = 12, 175 175 .mmal_component = COMP_CAMERA, 176 176 .ybbp = 1, 177 - .remove_padding = 1, 177 + .remove_padding = true, 178 178 }, { 179 179 .fourcc = V4L2_PIX_FMT_BGR32, 180 180 .mmal = MMAL_ENCODING_BGRA, 181 181 .depth = 32, 182 182 .mmal_component = COMP_CAMERA, 183 183 .ybbp = 4, 184 - .remove_padding = 0, 184 + .remove_padding = false, 185 185 }, 186 186 }; 187 187 ··· 1147 1147 struct vchiq_mmal_port *port = NULL, *camera_port = NULL; 1148 1148 struct vchiq_mmal_component *encode_component = NULL; 1149 1149 struct mmal_fmt *mfmt = get_format(f); 1150 - u32 remove_padding; 1150 + bool remove_padding; 1151 1151 1152 1152 if (!mfmt) 1153 1153 return -EINVAL;