linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] media: i2c: Simplify bool conversion
@ 2021-12-02  2:22 Yang Li
  0 siblings, 0 replies; only message in thread
From: Yang Li @ 2021-12-02  2:22 UTC (permalink / raw)
  To: djrscally; +Cc: mchehab, linux-media, linux-kernel, Yang Li

Fix the following coccicheck warning:
./drivers/media/i2c/ov5693.c:989:46-51: WARNING: conversion to bool not
needed here
./drivers/media/i2c/ov5693.c:991:46-51: WARNING: conversion to bool not
needed here

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/media/i2c/ov5693.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 2784fcf..4a5aa6e0 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -986,9 +986,9 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd,
 
 	mutex_lock(&ov5693->lock);
 
-	ov5693->mode.binning_x = hratio > 1 ? true : false;
+	ov5693->mode.binning_x = hratio > 1;
 	ov5693->mode.inc_x_odd = hratio > 1 ? 3 : 1;
-	ov5693->mode.binning_y = vratio > 1 ? true : false;
+	ov5693->mode.binning_y = vratio > 1;
 	ov5693->mode.inc_y_odd = vratio > 1 ? 3 : 1;
 
 	ov5693->mode.vts = __ov5693_calc_vts(fmt->height);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-02  2:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02  2:22 [PATCH -next] media: i2c: Simplify bool conversion Yang Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).