From: Sam Ravnborg <sam@ravnborg.org>
To: Jason Yan <yanaijie@huawei.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, b.zolnierkie@samsung.com
Subject: Re: [PATCH] video: fbdev: pxa168fb: make pxa168fb_init_mode() return void
Date: Sat, 09 May 2020 21:11:04 +0000 [thread overview]
Message-ID: <20200509211104.GC12666@ravnborg.org> (raw)
In-Reply-To: <20200506061745.19451-1-yanaijie@huawei.com>
Hi Jason.
On Wed, May 06, 2020 at 02:17:45PM +0800, Jason Yan wrote:
> No other functions use the return value of pxa168fb_init_mode() and the
> return value is always 0 now. Make it return void. This fixes the
> following coccicheck warning:
>
> drivers/video/fbdev/pxa168fb.c:565:5-8: Unneeded variable: "ret". Return
> "0" on line 597
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
> drivers/video/fbdev/pxa168fb.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
> index aef8a3042590..eedfbd3572a8 100644
> --- a/drivers/video/fbdev/pxa168fb.c
> +++ b/drivers/video/fbdev/pxa168fb.c
> @@ -557,12 +557,11 @@ static const struct fb_ops pxa168fb_ops = {
> .fb_imageblit = cfb_imageblit,
> };
>
> -static int pxa168fb_init_mode(struct fb_info *info,
> +static void pxa168fb_init_mode(struct fb_info *info,
> struct pxa168fb_mach_info *mi)
I fixed indent while applying.
For patches in drivers/gpu/ please use --strict when you verify with
checkpatch so you catch similar issues yourself.
Sam
> {
> struct pxa168fb_info *fbi = info->par;
> struct fb_var_screeninfo *var = &info->var;
> - int ret = 0;
> u32 total_w, total_h, refresh;
> u64 div_result;
> const struct fb_videomode *m;
> @@ -593,8 +592,6 @@ static int pxa168fb_init_mode(struct fb_info *info,
> div_result = 1000000000000ll;
> do_div(div_result, total_w * total_h * refresh);
> var->pixclock = (u32)div_result;
> -
> - return ret;
> }
>
> static int pxa168fb_probe(struct platform_device *pdev)
> --
> 2.21.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Jason Yan <yanaijie@huawei.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, b.zolnierkie@samsung.com
Subject: Re: [PATCH] video: fbdev: pxa168fb: make pxa168fb_init_mode() return void
Date: Sat, 9 May 2020 23:11:04 +0200 [thread overview]
Message-ID: <20200509211104.GC12666@ravnborg.org> (raw)
In-Reply-To: <20200506061745.19451-1-yanaijie@huawei.com>
Hi Jason.
On Wed, May 06, 2020 at 02:17:45PM +0800, Jason Yan wrote:
> No other functions use the return value of pxa168fb_init_mode() and the
> return value is always 0 now. Make it return void. This fixes the
> following coccicheck warning:
>
> drivers/video/fbdev/pxa168fb.c:565:5-8: Unneeded variable: "ret". Return
> "0" on line 597
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
> drivers/video/fbdev/pxa168fb.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
> index aef8a3042590..eedfbd3572a8 100644
> --- a/drivers/video/fbdev/pxa168fb.c
> +++ b/drivers/video/fbdev/pxa168fb.c
> @@ -557,12 +557,11 @@ static const struct fb_ops pxa168fb_ops = {
> .fb_imageblit = cfb_imageblit,
> };
>
> -static int pxa168fb_init_mode(struct fb_info *info,
> +static void pxa168fb_init_mode(struct fb_info *info,
> struct pxa168fb_mach_info *mi)
I fixed indent while applying.
For patches in drivers/gpu/ please use --strict when you verify with
checkpatch so you catch similar issues yourself.
Sam
> {
> struct pxa168fb_info *fbi = info->par;
> struct fb_var_screeninfo *var = &info->var;
> - int ret = 0;
> u32 total_w, total_h, refresh;
> u64 div_result;
> const struct fb_videomode *m;
> @@ -593,8 +592,6 @@ static int pxa168fb_init_mode(struct fb_info *info,
> div_result = 1000000000000ll;
> do_div(div_result, total_w * total_h * refresh);
> var->pixclock = (u32)div_result;
> -
> - return ret;
> }
>
> static int pxa168fb_probe(struct platform_device *pdev)
> --
> 2.21.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Jason Yan <yanaijie@huawei.com>
Cc: b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: pxa168fb: make pxa168fb_init_mode() return void
Date: Sat, 9 May 2020 23:11:04 +0200 [thread overview]
Message-ID: <20200509211104.GC12666@ravnborg.org> (raw)
In-Reply-To: <20200506061745.19451-1-yanaijie@huawei.com>
Hi Jason.
On Wed, May 06, 2020 at 02:17:45PM +0800, Jason Yan wrote:
> No other functions use the return value of pxa168fb_init_mode() and the
> return value is always 0 now. Make it return void. This fixes the
> following coccicheck warning:
>
> drivers/video/fbdev/pxa168fb.c:565:5-8: Unneeded variable: "ret". Return
> "0" on line 597
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
> drivers/video/fbdev/pxa168fb.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
> index aef8a3042590..eedfbd3572a8 100644
> --- a/drivers/video/fbdev/pxa168fb.c
> +++ b/drivers/video/fbdev/pxa168fb.c
> @@ -557,12 +557,11 @@ static const struct fb_ops pxa168fb_ops = {
> .fb_imageblit = cfb_imageblit,
> };
>
> -static int pxa168fb_init_mode(struct fb_info *info,
> +static void pxa168fb_init_mode(struct fb_info *info,
> struct pxa168fb_mach_info *mi)
I fixed indent while applying.
For patches in drivers/gpu/ please use --strict when you verify with
checkpatch so you catch similar issues yourself.
Sam
> {
> struct pxa168fb_info *fbi = info->par;
> struct fb_var_screeninfo *var = &info->var;
> - int ret = 0;
> u32 total_w, total_h, refresh;
> u64 div_result;
> const struct fb_videomode *m;
> @@ -593,8 +592,6 @@ static int pxa168fb_init_mode(struct fb_info *info,
> div_result = 1000000000000ll;
> do_div(div_result, total_w * total_h * refresh);
> var->pixclock = (u32)div_result;
> -
> - return ret;
> }
>
> static int pxa168fb_probe(struct platform_device *pdev)
> --
> 2.21.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-05-09 21:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 6:17 [PATCH] video: fbdev: pxa168fb: make pxa168fb_init_mode() return void Jason Yan
2020-05-06 6:17 ` Jason Yan
2020-05-06 6:17 ` Jason Yan
2020-05-09 21:09 ` Sam Ravnborg
2020-05-09 21:09 ` Sam Ravnborg
2020-05-09 21:09 ` Sam Ravnborg
2020-05-09 21:11 ` Sam Ravnborg [this message]
2020-05-09 21:11 ` Sam Ravnborg
2020-05-09 21:11 ` Sam Ravnborg
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=20200509211104.GC12666@ravnborg.org \
--to=sam@ravnborg.org \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yanaijie@huawei.com \
/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.