All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [PATCH] media: i2c: fix returnvar.cocci warnings
Date: Wed, 19 Jan 2022 13:24:47 +0800	[thread overview]
Message-ID: <20220119052447.GA6019@12eccf4f161c> (raw)
In-Reply-To: <202201191326.BbZWNNQm-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]

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,

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Daniel Scally <djrscally@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org,
	Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: [PATCH] media: i2c: fix returnvar.cocci warnings
Date: Wed, 19 Jan 2022 13:24:47 +0800	[thread overview]
Message-ID: <20220119052447.GA6019@12eccf4f161c> (raw)
In-Reply-To: <202201191326.BbZWNNQm-lkp@intel.com>

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,

  parent reply	other threads:[~2022-01-19  5:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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:26 ` kernel test robot
2022-01-19  5:24 ` [PATCH] media: i2c: fix boolconv.cocci warnings kernel test robot
2022-01-19  5:24   ` kernel test robot
2022-01-19  5:24 ` kernel test robot [this message]
2022-01-19  5:24   ` [PATCH] media: i2c: fix returnvar.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-02-13 19:50 [linux-next:master 2378/11103] drivers/media/i2c/ov8865.c:2527:5-8: Unneeded variable: "ret". Return "0" on line 2536 kernel test robot
2021-02-13 19:50 ` [PATCH] media: i2c: fix returnvar.cocci warnings kernel test robot
2021-01-16 19:58 [linux-next:master 2650/3956] drivers/media/i2c/ov8865.c:2850:5-11: inconsistent IS_ERR and PTR_ERR on line 2852 kernel test robot
2021-01-16 19:58 ` [PATCH] media: i2c: fix returnvar.cocci warnings kernel test robot
2019-10-03 11:43 Julia Lawall
2019-10-03 11:43 ` Julia Lawall
2019-10-03 11:43 ` Julia Lawall
2019-10-03 11:43 ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220119052447.GA6019@12eccf4f161c \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.