* [PATCH] media: imx: capture: Remove unneeded variable
@ 2018-10-19 1:40 Kimberly Brown
2018-10-19 7:04 ` [Outreachy kernel] " Julia Lawall
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kimberly Brown @ 2018-10-19 1:40 UTC (permalink / raw)
To: outreachy-kernel
Cc: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
Greg Kroah-Hartman
Remove local variable 'ret', which is used to store the return value.
It is not changed during function execution. Return the variable's
initial value, 0. Issue found by coccicheck.
Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
---
drivers/staging/media/imx/imx-media-capture.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
index 256039ce561e..f50f34b59694 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -536,7 +536,6 @@ static int capture_release(struct file *file)
struct capture_priv *priv = video_drvdata(file);
struct video_device *vfd = priv->vdev.vfd;
struct vb2_queue *vq = &priv->q;
- int ret = 0;
mutex_lock(&priv->mutex);
@@ -549,7 +548,7 @@ static int capture_release(struct file *file)
v4l2_fh_release(file);
mutex_unlock(&priv->mutex);
- return ret;
+ return 0;
}
static const struct v4l2_file_operations capture_fops = {
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Outreachy kernel] [PATCH] media: imx: capture: Remove unneeded variable
2018-10-19 1:40 [PATCH] media: imx: capture: Remove unneeded variable Kimberly Brown
@ 2018-10-19 7:04 ` Julia Lawall
2018-10-19 9:55 ` Philipp Zabel
2018-10-19 15:57 ` Steve Longerbeam
2 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2018-10-19 7:04 UTC (permalink / raw)
To: Kimberly Brown
Cc: outreachy-kernel, Steve Longerbeam, Philipp Zabel,
Mauro Carvalho Chehab, Greg Kroah-Hartman
On Thu, 18 Oct 2018, Kimberly Brown wrote:
> Remove local variable 'ret', which is used to store the return value.
> It is not changed during function execution. Return the variable's
> initial value, 0. Issue found by coccicheck.
>
> Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> drivers/staging/media/imx/imx-media-capture.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index 256039ce561e..f50f34b59694 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -536,7 +536,6 @@ static int capture_release(struct file *file)
> struct capture_priv *priv = video_drvdata(file);
> struct video_device *vfd = priv->vdev.vfd;
> struct vb2_queue *vq = &priv->q;
> - int ret = 0;
>
> mutex_lock(&priv->mutex);
>
> @@ -549,7 +548,7 @@ static int capture_release(struct file *file)
>
> v4l2_fh_release(file);
> mutex_unlock(&priv->mutex);
> - return ret;
> + return 0;
> }
>
> static const struct v4l2_file_operations capture_fops = {
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20181019014041.GA9250%40v.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] media: imx: capture: Remove unneeded variable
2018-10-19 1:40 [PATCH] media: imx: capture: Remove unneeded variable Kimberly Brown
2018-10-19 7:04 ` [Outreachy kernel] " Julia Lawall
@ 2018-10-19 9:55 ` Philipp Zabel
2018-10-19 15:57 ` Steve Longerbeam
2 siblings, 0 replies; 4+ messages in thread
From: Philipp Zabel @ 2018-10-19 9:55 UTC (permalink / raw)
To: Kimberly Brown, outreachy-kernel
Cc: Steve Longerbeam, Mauro Carvalho Chehab, Greg Kroah-Hartman
Hi Kimberly,
On Thu, 2018-10-18 at 21:40 -0400, Kimberly Brown wrote:
> Remove local variable 'ret', which is used to store the return value.
> It is not changed during function execution. Return the variable's
> initial value, 0. Issue found by coccicheck.
>
> Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
> ---
> drivers/staging/media/imx/imx-media-capture.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index 256039ce561e..f50f34b59694 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -536,7 +536,6 @@ static int capture_release(struct file *file)
> struct capture_priv *priv = video_drvdata(file);
> struct video_device *vfd = priv->vdev.vfd;
> struct vb2_queue *vq = &priv->q;
> - int ret = 0;
>
> mutex_lock(&priv->mutex);
>
> @@ -549,7 +548,7 @@ static int capture_release(struct file *file)
>
> v4l2_fh_release(file);
> mutex_unlock(&priv->mutex);
> - return ret;
> + return 0;
> }
>
> static const struct v4l2_file_operations capture_fops = {
Thank you for the patch,
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] media: imx: capture: Remove unneeded variable
2018-10-19 1:40 [PATCH] media: imx: capture: Remove unneeded variable Kimberly Brown
2018-10-19 7:04 ` [Outreachy kernel] " Julia Lawall
2018-10-19 9:55 ` Philipp Zabel
@ 2018-10-19 15:57 ` Steve Longerbeam
2 siblings, 0 replies; 4+ messages in thread
From: Steve Longerbeam @ 2018-10-19 15:57 UTC (permalink / raw)
To: Kimberly Brown, outreachy-kernel
Cc: Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman
Acked-by: Steve Longerbeam <slongerbeam@gmail.com>
On 10/18/18 6:40 PM, Kimberly Brown wrote:
> Remove local variable 'ret', which is used to store the return value.
> It is not changed during function execution. Return the variable's
> initial value, 0. Issue found by coccicheck.
>
> Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
> ---
> drivers/staging/media/imx/imx-media-capture.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index 256039ce561e..f50f34b59694 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -536,7 +536,6 @@ static int capture_release(struct file *file)
> struct capture_priv *priv = video_drvdata(file);
> struct video_device *vfd = priv->vdev.vfd;
> struct vb2_queue *vq = &priv->q;
> - int ret = 0;
>
> mutex_lock(&priv->mutex);
>
> @@ -549,7 +548,7 @@ static int capture_release(struct file *file)
>
> v4l2_fh_release(file);
> mutex_unlock(&priv->mutex);
> - return ret;
> + return 0;
> }
>
> static const struct v4l2_file_operations capture_fops = {
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-19 16:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19 1:40 [PATCH] media: imx: capture: Remove unneeded variable Kimberly Brown
2018-10-19 7:04 ` [Outreachy kernel] " Julia Lawall
2018-10-19 9:55 ` Philipp Zabel
2018-10-19 15:57 ` Steve Longerbeam
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.