* [PATCH] media: i2c: remove unneeded variable
@ 2022-01-12 9:17 cgel.zte
2022-01-12 9:19 ` Hans Verkuil
2022-01-14 0:03 ` Daniel Scally
0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-01-12 9:17 UTC (permalink / raw)
To: djrscally; +Cc: mchehab, linux-media, linux-kernel, Changcheng Deng, Zeal Robot
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Remove unneeded variable used to store return value.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
drivers/media/i2c/ov5693.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 2784fcf67f3b..a55910f6283a 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -950,7 +950,6 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd,
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_subdev *sd,
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_subdev *sd,
exposure_max));
mutex_unlock(&ov5693->lock);
- return ret;
+ return 0;
}
static int ov5693_get_selection(struct v4l2_subdev *sd,
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: i2c: remove unneeded variable
2022-01-12 9:17 [PATCH] media: i2c: remove unneeded variable cgel.zte
@ 2022-01-12 9:19 ` Hans Verkuil
2022-01-14 0:03 ` Daniel Scally
1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2022-01-12 9:19 UTC (permalink / raw)
To: cgel.zte, djrscally
Cc: mchehab, linux-media, linux-kernel, Changcheng Deng, Zeal Robot
On 12/01/2022 10:17, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Remove unneeded variable used to store return value.
Please add the driver name in the subject prefix! Why is that so hard to
remember?
Regards,
Hans
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> ---
> drivers/media/i2c/ov5693.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
> index 2784fcf67f3b..a55910f6283a 100644
> --- a/drivers/media/i2c/ov5693.c
> +++ b/drivers/media/i2c/ov5693.c
> @@ -950,7 +950,6 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd,
> 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_subdev *sd,
> 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_subdev *sd,
> exposure_max));
>
> mutex_unlock(&ov5693->lock);
> - return ret;
> + return 0;
> }
>
> static int ov5693_get_selection(struct v4l2_subdev *sd,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: i2c: remove unneeded variable
2022-01-12 9:17 [PATCH] media: i2c: remove unneeded variable cgel.zte
2022-01-12 9:19 ` Hans Verkuil
@ 2022-01-14 0:03 ` Daniel Scally
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Scally @ 2022-01-14 0:03 UTC (permalink / raw)
To: cgel.zte
Cc: mchehab, linux-media, linux-kernel, Changcheng Deng, Zeal Robot,
hverkuil
Hello
On 12/01/2022 09:17, cgel.zte@gmail.com wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Remove unneeded variable used to store return value.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
Yeah good catch. With Hans' comment about the subject line addressed:
Reviewed-by: Daniel Scally <djrscally@gmail.com>
> ---
> drivers/media/i2c/ov5693.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
> index 2784fcf67f3b..a55910f6283a 100644
> --- a/drivers/media/i2c/ov5693.c
> +++ b/drivers/media/i2c/ov5693.c
> @@ -950,7 +950,6 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd,
> 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_subdev *sd,
> 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_subdev *sd,
> exposure_max));
>
> mutex_unlock(&ov5693->lock);
> - return ret;
> + return 0;
> }
>
> static int ov5693_get_selection(struct v4l2_subdev *sd,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-14 0:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 9:17 [PATCH] media: i2c: remove unneeded variable cgel.zte
2022-01-12 9:19 ` Hans Verkuil
2022-01-14 0:03 ` Daniel Scally
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).