* [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res'
@ 2020-09-10 14:05 Jason Yan
2020-09-10 14:39 ` Gustavo A. R. Silva
2020-10-17 6:28 ` Sam Ravnborg
0 siblings, 2 replies; 3+ messages in thread
From: Jason Yan @ 2020-09-10 14:05 UTC (permalink / raw)
To: timur, b.zolnierkie, gustavoars, linux-fbdev, dri-devel, linux-kernel
Cc: Jason Yan, Hulk Robot
Eliminate the following coccicheck warning:
drivers/video/fbdev/fsl-diu-fb.c:1428:5-8: Unneeded variable: "res".
Return "0" on line 1450
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/video/fbdev/fsl-diu-fb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index a547c21c7e92..e332017c6af6 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1425,7 +1425,6 @@ static int fsl_diu_open(struct fb_info *info, int user)
static int fsl_diu_release(struct fb_info *info, int user)
{
struct mfb_info *mfbi = info->par;
- int res = 0;
spin_lock(&diu_lock);
mfbi->count--;
@@ -1447,7 +1446,7 @@ static int fsl_diu_release(struct fb_info *info, int user)
}
spin_unlock(&diu_lock);
- return res;
+ return 0;
}
static const struct fb_ops fsl_diu_ops = {
--
2.25.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res'
2020-09-10 14:05 [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res' Jason Yan
@ 2020-09-10 14:39 ` Gustavo A. R. Silva
2020-10-17 6:28 ` Sam Ravnborg
1 sibling, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2020-09-10 14:39 UTC (permalink / raw)
To: Jason Yan
Cc: timur, b.zolnierkie, linux-fbdev, dri-devel, linux-kernel, Hulk Robot
On Thu, Sep 10, 2020 at 10:05:58PM +0800, Jason Yan wrote:
> Eliminate the following coccicheck warning:
>
> drivers/video/fbdev/fsl-diu-fb.c:1428:5-8: Unneeded variable: "res".
> Return "0" on line 1450
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Acked-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Thanks
--
Gustavo
> ---
> drivers/video/fbdev/fsl-diu-fb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
> index a547c21c7e92..e332017c6af6 100644
> --- a/drivers/video/fbdev/fsl-diu-fb.c
> +++ b/drivers/video/fbdev/fsl-diu-fb.c
> @@ -1425,7 +1425,6 @@ static int fsl_diu_open(struct fb_info *info, int user)
> static int fsl_diu_release(struct fb_info *info, int user)
> {
> struct mfb_info *mfbi = info->par;
> - int res = 0;
>
> spin_lock(&diu_lock);
> mfbi->count--;
> @@ -1447,7 +1446,7 @@ static int fsl_diu_release(struct fb_info *info, int user)
> }
>
> spin_unlock(&diu_lock);
> - return res;
> + return 0;
> }
>
> static const struct fb_ops fsl_diu_ops = {
> --
> 2.25.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res'
2020-09-10 14:05 [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res' Jason Yan
2020-09-10 14:39 ` Gustavo A. R. Silva
@ 2020-10-17 6:28 ` Sam Ravnborg
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2020-10-17 6:28 UTC (permalink / raw)
To: Jason Yan
Cc: timur, b.zolnierkie, gustavoars, linux-fbdev, dri-devel,
linux-kernel, Hulk Robot
On Thu, Sep 10, 2020 at 10:05:58PM +0800, Jason Yan wrote:
> Eliminate the following coccicheck warning:
>
> drivers/video/fbdev/fsl-diu-fb.c:1428:5-8: Unneeded variable: "res".
> Return "0" on line 1450
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Hi Jason,
applied to drm-misc-next too.
Sam
> ---
> drivers/video/fbdev/fsl-diu-fb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
> index a547c21c7e92..e332017c6af6 100644
> --- a/drivers/video/fbdev/fsl-diu-fb.c
> +++ b/drivers/video/fbdev/fsl-diu-fb.c
> @@ -1425,7 +1425,6 @@ static int fsl_diu_open(struct fb_info *info, int user)
> static int fsl_diu_release(struct fb_info *info, int user)
> {
> struct mfb_info *mfbi = info->par;
> - int res = 0;
>
> spin_lock(&diu_lock);
> mfbi->count--;
> @@ -1447,7 +1446,7 @@ static int fsl_diu_release(struct fb_info *info, int user)
> }
>
> spin_unlock(&diu_lock);
> - return res;
> + return 0;
> }
>
> static const struct fb_ops fsl_diu_ops = {
> --
> 2.25.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-17 6:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 14:05 [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res' Jason Yan
2020-09-10 14:39 ` Gustavo A. R. Silva
2020-10-17 6:28 ` Sam Ravnborg
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).