aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2010-10-22 03:10:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-22 20:09:21 -0400
commitdda7ae789f1d9b0c2528f7abc37f4316f8fa1e0f (patch)
treebb8d0a170f3a88cc2a7bc2ed0a9d3b8c081e90e9 /drivers/media
parent29adc2c06fd7aa0a26135d8c96afd1cef9e6700b (diff)
[media] s5p-fimc: dubious one-bit signed bitfields
> From: Dan Carpenter [mailto:error27@gmail.com] > > These are signed so instead of being 1 and 0 as intended they are -1 and > 0. It doesn't cause a bug in the current code but Sparse warns about > it: > > drivers/media/video/s5p-fimc/fimc-core.h:226:28: > error: dubious one-bit signed bitfield > struct fimc_scaler { > - int scaleup_h:1; > - int scaleup_v:1; > - int copy_mode:1; > - int enabled:1; > + unsigned int scaleup_h:1; > + unsigned int caleup_v:1; > + unsigned int copy_mode:1; > + unsigned int enabled:1; In general I agree, however this patch would change scaleup_v:1 to caleup_v, so it cannot be applied in current form. Here is the corrected patch: Reported-by: Dan Carpenter <error27@gmail.com< Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-core.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h
index e3a7c6a0dce2..3e1078516560 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.h
+++ b/drivers/media/video/s5p-fimc/fimc-core.h
@@ -222,10 +222,10 @@ struct fimc_effect {
222 * @real_height: source pixel (height - offset) 222 * @real_height: source pixel (height - offset)
223 */ 223 */
224struct fimc_scaler { 224struct fimc_scaler {
225 int scaleup_h:1; 225 unsigned int scaleup_h:1;
226 int scaleup_v:1; 226 unsigned int scaleup_v:1;
227 int copy_mode:1; 227 unsigned int copy_mode:1;
228 int enabled:1; 228 unsigned int enabled:1;
229 u32 hfactor; 229 u32 hfactor;
230 u32 vfactor; 230 u32 vfactor;
231 u32 pre_hratio; 231 u32 pre_hratio;