* [PATCH] media: i2c: fix returnvar.cocci warnings
@ 2019-10-03 11:43 Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2019-10-03 11:43 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: mchehab, robh+dt, sakari.ailus, linux-media, linux-kernel,
devicetree, linux-arm-kernel, c.barrett, a.brela,
Manivannan Sadhasivam, kbuild-all
From: kbuild test robot <lkp@intel.com>
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Fixes: a80daf4057d7 ("media: i2c: Add IMX290 CMOS image sensor driver")
CC: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
url: https://github.com/0day-ci/linux/commits/Manivannan-Sadhasivam/dt-bindings-media-i2c-Add-IMX290-CMOS-sensor-binding/20191003-175652
base: git://linuxtv.org/media_tree.git master
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago
Please take the patch only if it's a positive warning. Thanks!
imx290.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -447,7 +447,6 @@ static int imx290_set_fmt(struct v4l2_su
const struct imx290_mode *mode;
struct v4l2_mbus_framefmt *format;
unsigned int i;
- int ret = 0;
mutex_lock(&imx290->lock);
@@ -483,7 +482,7 @@ static int imx290_set_fmt(struct v4l2_su
mutex_unlock(&imx290->lock);
- return ret;
+ return 0;
}
static int imx290_entity_init_cfg(struct v4l2_subdev *subdev,
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] media: i2c: fix returnvar.cocci warnings
2022-01-19 5:26 drivers/media/i2c/ov5693.c:989:46-51: WARNING: conversion to bool not needed here kernel test robot
@ 2022-01-19 5:24 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-19 5:24 UTC (permalink / raw)
To: Daniel Scally
Cc: kbuild-all, linux-kernel, Mauro Carvalho Chehab, linux-media,
Jean-Michel Hautbois, Sakari Ailus
From: kernel test robot <lkp@intel.com>
drivers/media/i2c/ov5693.c:953:5-8: Unneeded variable: "ret". Return "0" on line 985
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
CC: Daniel Scally <djrscally@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 99613159ad749543621da8238acf1a122880144e
commit: 89aef879cb537061f7a0948210fc00c5f1b5dfb4 media: i2c: Add support for ov5693 sensor
:::::: branch date: 17 hours ago
:::::: commit date: 7 weeks ago
ov5693.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -950,7 +950,6 @@ static int ov5693_set_fmt(struct v4l2_su
unsigned int width, height;
unsigned int hblank;
int exposure_max;
- int ret = 0;
crop = __ov5693_get_pad_crop(ov5693, state, format->pad, format->which);
@@ -982,7 +981,7 @@ static int ov5693_set_fmt(struct v4l2_su
format->format = *fmt;
if (format->which == V4L2_SUBDEV_FORMAT_TRY)
- return ret;
+ return 0;
mutex_lock(&ov5693->lock);
@@ -1012,7 +1011,7 @@ static int ov5693_set_fmt(struct v4l2_su
exposure_max));
mutex_unlock(&ov5693->lock);
- return ret;
+ return 0;
}
static int ov5693_get_selection(struct v4l2_subdev *sd,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-19 5:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 11:43 [PATCH] media: i2c: fix returnvar.cocci warnings Julia Lawall
2022-01-19 5:26 drivers/media/i2c/ov5693.c:989:46-51: WARNING: conversion to bool not needed here kernel test robot
2022-01-19 5:24 ` [PATCH] media: i2c: fix returnvar.cocci warnings kernel test robot
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).