Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: omap2: fix warnings in dss core

Commit 60d2fa0dad06 ("fbdev: omap2: no need to check return value of
debugfs_create functions") changed the declaration of the return value
of function dss_debugfs_create_file() and the following two warnings
appeared:

drivers/video/fbdev/omap2/omapfb/dss/core.c: In function ‘dss_debugfs_create_file’:
drivers/video/fbdev/omap2/omapfb/dss/core.c:139:9: warning: ‘return’ with a value,
in function returning void
return 0;
^
drivers/video/fbdev/omap2/omapfb/dss/core.c: In function ‘omap_dss_probe’:
drivers/video/fbdev/omap2/omapfb/dss/core.c:172:6: warning: unused variable ‘r’
[-Wunused-variable]
int r;
^

Rework so function dss_debugfs_create_file() that is declared to return
void don't 'return 0' and remove the declaration of the unused variable
'r'.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Anders Roxell and committed by
Bartlomiej Zolnierkiewicz
4c83c2f7 f4029844

-3
-3
drivers/video/fbdev/omap2/omapfb/dss/core.c
··· 136 136 } 137 137 void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) 138 138 { 139 - return 0; 140 139 } 141 140 #endif /* CONFIG_FB_OMAP2_DSS_DEBUGFS */ 142 141 ··· 168 169 169 170 static int __init omap_dss_probe(struct platform_device *pdev) 170 171 { 171 - int r; 172 - 173 172 core.pdev = pdev; 174 173 175 174 dss_features_init(omapdss_get_version());