video: fbdev: pxa168fb: make pxa168fb_init_mode() return void
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> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> [fixed indent] Link: https://patchwork.freedesktop.org/patch/msgid/20200506061745.19451-1-yanaijie@huawei.com
This commit is contained in:
parent
7429e92386
commit
6e85bd73d5
|
@ -557,12 +557,11 @@ static const struct fb_ops pxa168fb_ops = {
|
||||||
.fb_imageblit = cfb_imageblit,
|
.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)
|
struct pxa168fb_mach_info *mi)
|
||||||
{
|
{
|
||||||
struct pxa168fb_info *fbi = info->par;
|
struct pxa168fb_info *fbi = info->par;
|
||||||
struct fb_var_screeninfo *var = &info->var;
|
struct fb_var_screeninfo *var = &info->var;
|
||||||
int ret = 0;
|
|
||||||
u32 total_w, total_h, refresh;
|
u32 total_w, total_h, refresh;
|
||||||
u64 div_result;
|
u64 div_result;
|
||||||
const struct fb_videomode *m;
|
const struct fb_videomode *m;
|
||||||
|
@ -593,8 +592,6 @@ static int pxa168fb_init_mode(struct fb_info *info,
|
||||||
div_result = 1000000000000ll;
|
div_result = 1000000000000ll;
|
||||||
do_div(div_result, total_w * total_h * refresh);
|
do_div(div_result, total_w * total_h * refresh);
|
||||||
var->pixclock = (u32)div_result;
|
var->pixclock = (u32)div_result;
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pxa168fb_probe(struct platform_device *pdev)
|
static int pxa168fb_probe(struct platform_device *pdev)
|
||||||
|
|
Loading…
Reference in New Issue