Following the great work of Lee Jones in other subsystems here is a set of patches that address all remaining W=1 warnings in drivers/video/. Lee Jones already fixed all warnings in video/backlight/ so this is mostly fbdev related fixes.
The general approach used were: - Fix kernel-doc, this is often very trivial - Drop unused local variables
Build tested on a set of architectures with various configs.
The patches do not depend on each other and fixes for one driver are kept in a single patch.
v2: - Updated subject of the patches to tell what was fixed (Lee) - Fixed build error in one patch (kernel test robot) - A few editorials updates to the changelog messages
v3: - Applied patches that was acked - thanks Thomas! - Updated patches after feedback from Randy and Thomas - Added several new patches to cover warnings that triggers with other architectures than the one I used for v1 + v2 - Included one sh specific fix that handle a corner-case, let's see what the sh people say to that - One fix to previous set of patches to fix an issue reported by Coverity (By Colin)
Sam
Sam Ravnborg (13): video: fbdev: hgafb: Fix kernel-doc warnings video: fbdev: core: Fix kernel-doc warnings in fbmon + fb_notify video: fbdev: omapfb: Fix set but not used warnings in hdmi*_core video: fbdev: uvesafb: Fix set but not used warning sh: Fix set but not used warnings with !CONFIG_MMU video: fbdev: sparc drivers: fix kernel-doc warnings for blank_mode video: fbdev: mmp: Fix kernel-doc warning for lcd_spi_write video: fbdev: wmt_ge_rops: Fix function not declared warnings video: fbdev: goldfishfb: Fix defined but not used warning video: fbdev: gbefb: Fix set but not used warning video: fbdev: efifb: Fix set but not used warning for screen_pitch video: fbdev: controlfb: Fix set but not used warnings video: fbdev: sis: Drop useless call to SiS_GetResInfo()
arch/sh/include/asm/io.h | 2 +- drivers/video/fbdev/bw2.c | 2 +- drivers/video/fbdev/cg3.c | 2 +- drivers/video/fbdev/cg6.c | 2 +- drivers/video/fbdev/controlfb.c | 4 ++-- drivers/video/fbdev/core/fb_notify.c | 10 ++++++++++ drivers/video/fbdev/core/fbmon.c | 2 +- drivers/video/fbdev/efifb.c | 3 +-- drivers/video/fbdev/ffb.c | 2 +- drivers/video/fbdev/gbefb.c | 4 +--- drivers/video/fbdev/goldfishfb.c | 2 ++ drivers/video/fbdev/hgafb.c | 10 +++++----- drivers/video/fbdev/leo.c | 2 +- drivers/video/fbdev/mmp/hw/mmp_spi.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | 4 ++-- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 4 ++-- drivers/video/fbdev/p9100.c | 2 +- drivers/video/fbdev/sis/init.c | 1 - drivers/video/fbdev/tcx.c | 2 +- drivers/video/fbdev/uvesafb.c | 2 ++ drivers/video/fbdev/wmt_ge_rops.c | 1 + 21 files changed, 38 insertions(+), 27 deletions(-)
Fix kernel-doc comments.
v2: - Updated subject (Lee)
v3: - Add space after ':' (Randy) - Fix name of function in comment
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Ferenc Bakonyi fero@drama.obuda.kando.hu Cc: linux-nvidia@lists.surfsouth.com Cc: Lee Jones lee.jones@linaro.org --- drivers/video/fbdev/hgafb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c index a45fcff1461f..8bbac7182ad3 100644 --- a/drivers/video/fbdev/hgafb.c +++ b/drivers/video/fbdev/hgafb.c @@ -357,8 +357,8 @@ static int hga_card_detect(void)
/** * hgafb_open - open the framebuffer device - * @info:pointer to fb_info object containing info for current hga board - * @int:open by console system or userland. + * @info: pointer to fb_info object containing info for current hga board + * @init: open by console system or userland. */
static int hgafb_open(struct fb_info *info, int init) @@ -370,9 +370,9 @@ static int hgafb_open(struct fb_info *info, int init) }
/** - * hgafb_open - open the framebuffer device - * @info:pointer to fb_info object containing info for current hga board - * @int:open by console system or userland. + * hgafb_release - open the framebuffer device + * @info: pointer to fb_info object containing info for current hga board + * @init: open by console system or userland. */
static int hgafb_release(struct fb_info *info, int init)
On 12/6/20 11:02 AM, Sam Ravnborg wrote:
LGTM. Thanks.
Acked-by: Randy Dunlap rdunlap@infradead.org
Fix kernel-doc warnings reported when using W=1
v2: - Improve subject (Lee)
v3: - Add RETURNS documentation (Thomas)
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Lee Jones lee.jones@linaro.org Cc: Sam Ravnborg sam@ravnborg.org Cc: Randy Dunlap rdunlap@infradead.org Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: Daniel Vetter daniel.vetter@ffwll.ch Cc: "Alexander A. Klimov" grandmaster@al2klimov.de --- drivers/video/fbdev/core/fb_notify.c | 10 ++++++++++ drivers/video/fbdev/core/fbmon.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/core/fb_notify.c b/drivers/video/fbdev/core/fb_notify.c index 74c2da528884..4e39c61fae1f 100644 --- a/drivers/video/fbdev/core/fb_notify.c +++ b/drivers/video/fbdev/core/fb_notify.c @@ -19,6 +19,9 @@ static BLOCKING_NOTIFIER_HEAD(fb_notifier_list); /** * fb_register_client - register a client notifier * @nb: notifier block to callback on events + * + * RETURNS: + * 0 on success, negative error code on failure. */ int fb_register_client(struct notifier_block *nb) { @@ -29,6 +32,9 @@ EXPORT_SYMBOL(fb_register_client); /** * fb_unregister_client - unregister a client notifier * @nb: notifier block to callback on events + * + * RETURNS: + * 0 on success, negative error code on failure. */ int fb_unregister_client(struct notifier_block *nb) { @@ -38,7 +44,11 @@ EXPORT_SYMBOL(fb_unregister_client);
/** * fb_notifier_call_chain - notify clients of fb_events + * @val: value passed to callback + * @v: pointer passed to callback * + * RETURNS: + * The return value of the last notifier function */ int fb_notifier_call_chain(unsigned long val, void *v) { diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index 1bf82dbc9e3c..b0e690f41025 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -605,6 +605,7 @@ static void get_detailed_timing(unsigned char *block, * fb_create_modedb - create video mode database * @edid: EDID data * @dbsize: database size + * @specs: monitor specifications, may be NULL * * RETURNS: struct fb_videomode, @dbsize contains length of database * @@ -1100,7 +1101,6 @@ static u32 fb_get_hblank_by_hfreq(u32 hfreq, u32 xres) * 2 * M * M = 300; * C = 30; - */ static u32 fb_get_hblank_by_dclk(u32 dclk, u32 xres) {
On 12/6/20 11:02 AM, Sam Ravnborg wrote:
Hi Sam,
Yes, RETURNS: will work. It just looks like any kernel-doc section name, such as Context: or Note:. However, the documented format for return info is "Return:". (see Documentation/doc-guide/kernel-doc.rst)
Hi Randy.
On Sun, Dec 06, 2020 at 11:37:17AM -0800, Randy Dunlap wrote:
OK, like this? I did not fix any existing uses of RETURNS, thats for another patch.
Sam
commit 03b7c3ecf7cb51b5429ca0ef58a32bb4dc486610 Author: Sam Ravnborg sam@ravnborg.org Date: Sat Nov 28 23:40:49 2020 +0100
video: fbdev: core: Fix kernel-doc warnings in fbmon + fb_notify
Fix kernel-doc warnings reported when using W=1
v2: - Improve subject (Lee)
v3: - Add RETURNS documentation (Thomas)
v4: - Use Return: not RETURNS (Randy)
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Lee Jones lee.jones@linaro.org Cc: Sam Ravnborg sam@ravnborg.org Cc: Randy Dunlap rdunlap@infradead.org Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: Daniel Vetter daniel.vetter@ffwll.ch Cc: "Alexander A. Klimov" grandmaster@al2klimov.de
diff --git a/drivers/video/fbdev/core/fb_notify.c b/drivers/video/fbdev/core/fb_notify.c index 74c2da528884..10e3b9a74adc 100644 --- a/drivers/video/fbdev/core/fb_notify.c +++ b/drivers/video/fbdev/core/fb_notify.c @@ -19,6 +19,8 @@ static BLOCKING_NOTIFIER_HEAD(fb_notifier_list); /** * fb_register_client - register a client notifier * @nb: notifier block to callback on events + * + * Return: 0 on success, negative error code on failure. */ int fb_register_client(struct notifier_block *nb) { @@ -29,6 +31,8 @@ EXPORT_SYMBOL(fb_register_client); /** * fb_unregister_client - unregister a client notifier * @nb: notifier block to callback on events + * + * Return: 0 on success, negative error code on failure. */ int fb_unregister_client(struct notifier_block *nb) { @@ -38,7 +42,10 @@ EXPORT_SYMBOL(fb_unregister_client);
/** * fb_notifier_call_chain - notify clients of fb_events + * @val: value passed to callback + * @v: pointer passed to callback * + * Return: The return value of the last notifier function */ int fb_notifier_call_chain(unsigned long val, void *v) { diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index 1bf82dbc9e3c..b0e690f41025 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -605,6 +605,7 @@ static void get_detailed_timing(unsigned char *block, * fb_create_modedb - create video mode database * @edid: EDID data * @dbsize: database size + * @specs: monitor specifications, may be NULL * * RETURNS: struct fb_videomode, @dbsize contains length of database * @@ -1100,7 +1101,6 @@ static u32 fb_get_hblank_by_hfreq(u32 hfreq, u32 xres) * 2 * M * M = 300; * C = 30; - */ static u32 fb_get_hblank_by_dclk(u32 dclk, u32 xres) {
On 12/6/20 12:52 PM, Sam Ravnborg wrote:
Yes. LGTM.
Acked-by: Randy Dunlap rdunlap@infradead.org
Hi
Am 06.12.20 um 20:37 schrieb Randy Dunlap:
Thanks for the note. I asked for RETURNS: because the rest of the file appears to be using it. Returns: is certainly the better alternative. I didn't know there was a difference.
Best regards Thomas
Hi Randy,
fb_notify.c contains only the three functions modified in this patch.
So it is consistent within this file, but other fbdev/core/ files uses RETURNS. git grep shows 5 hits only.
So we will stick with the documented practice here.
Sam
Fix a few W=1 warnings about unused assignments. Drop the unused error code.
v2: - Subject updated (Lee)
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Sam Ravnborg sam@ravnborg.org Cc: Qilong Zhang zhangqilong3@huawei.com Cc: "Alexander A. Klimov" grandmaster@al2klimov.de Cc: Daniel Vetter daniel.vetter@ffwll.ch Cc: Lee Jones lee.jones@linaro.org --- drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | 4 ++-- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c index 726c190862d4..e6363a420933 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c @@ -679,7 +679,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, struct hdmi_audio_format audio_format; struct hdmi_audio_dma audio_dma; struct hdmi_core_audio_config acore; - int err, n, cts, channel_count; + int n, cts, channel_count; unsigned int fs_nr; bool word_length_16b = false;
@@ -741,7 +741,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, return -EINVAL; }
- err = hdmi_compute_acr(pclk, fs_nr, &n, &cts); + hdmi_compute_acr(pclk, fs_nr, &n, &cts);
/* Audio clock regeneration settings */ acore.n = n; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c index eda29d3032e1..cb63bc0e92ca 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c @@ -790,7 +790,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, struct hdmi_audio_format audio_format; struct hdmi_audio_dma audio_dma; struct hdmi_core_audio_config core_cfg; - int err, n, cts, channel_count; + int n, cts, channel_count; unsigned int fs_nr; bool word_length_16b = false;
@@ -833,7 +833,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, return -EINVAL; }
- err = hdmi_compute_acr(pclk, fs_nr, &n, &cts); + hdmi_compute_acr(pclk, fs_nr, &n, &cts); core_cfg.n = n; core_cfg.cts = cts;
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
Fix W=1 warning by deleting unused local variable.
v2: - Updated subject (Lee)
v3: - Return early in case of an error (Thomas)
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Michal Januszewski spock@gentoo.org Cc: linux-fbdev@vger.kernel.org Cc: Lee Jones lee.jones@linaro.org --- drivers/video/fbdev/uvesafb.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c index 6c9cfab39313..4df6772802d7 100644 --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -560,6 +560,8 @@ static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task, task->t.regs.eax = 0x4f0a; task->t.regs.ebx = 0x0; err = uvesafb_exec(task); + if (err) + return err;
if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) { par->pmi_setpal = par->ypan = 0;
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
Building fbdev drivers for sh with W=1 produces the following warning:
tmiofb.c: In function ‘tmiofb_remove’: tmiofb.c:805:21: warning: variable ‘par’ set but not used
This is with allmodconfig and ARCH=sh
This boiled down to iounmap() defined as empty for !CONFIG_MMU. Fix this by by adding "(void)addr;" to tell the compiler the argument to iounmap() should be considered used.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Thomas Zimmermann tzimmermann@suse.de Cc: Lee Jones lee.jones@linaro.org Cc: Rich Felker dalias@libc.org Cc: Arnd Bergmann arnd@arndb.de Cc: Geert Uytterhoeven geert+renesas@glider.be Cc: Mike Rapoport rppt@kernel.org Cc: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Cc: Peter Zijlstra peterz@infradead.org Cc: Sam Ravnborg sam@ravnborg.org Cc: Andrew Morton akpm@linux-foundation.org --- arch/sh/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 6d5c6463bc07..5ad56c6c1e1e 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -271,7 +271,7 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, #endif /* CONFIG_HAVE_IOREMAP_PROT */
#else /* CONFIG_MMU */ -#define iounmap(addr) do { } while (0) +#define iounmap(addr) do { (void)addr; } while (0) #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) #endif /* CONFIG_MMU */
Hi Sam,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20201204] [also build test ERROR on v5.10-rc6] [cannot apply to tegra-drm/drm/tegra/for-next soc/for-next linus/master drm/drm-next v5.10-rc6 v5.10-rc5 v5.10-rc4] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/drivers-video-W-1-warn... base: 2996bd3f6ca9ea529b40c369a94b247657abdb4d config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/9c4170037512dc3810cd88f57e3c3a442304... git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sam-Ravnborg/drivers-video-W-1-warning-fixes/20201207-030414 git checkout 9c4170037512dc3810cd88f57e3c3a442304b7cf # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot lkp@intel.com
All errors (new ones prefixed by >>):
In file included from include/linux/io.h:13, from include/linux/irq.h:20, from include/asm-generic/hardirq.h:17, from arch/sh/include/asm/hardirq.h:9, from include/linux/hardirq.h:10, from include/linux/interrupt.h:11, from drivers/net/ethernet/xircom/xirc2ps_cs.c:74: drivers/net/ethernet/xircom/xirc2ps_cs.c: In function 'xirc2ps_release':
arch/sh/include/asm/io.h:274:29: error: void value not ignored as it ought to be
274 | #define iounmap(addr) do { (void)addr; } while (0) drivers/net/ethernet/xircom/xirc2ps_cs.c:935:4: note: in expansion of macro 'iounmap' 935 | iounmap(local->dingo_ccr - 0x0800); | ^~~~~~~
vim +274 arch/sh/include/asm/io.h
272 273 #else /* CONFIG_MMU */
274 #define iounmap(addr) do { (void)addr; } while (0)
275 #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) 276 #endif /* CONFIG_MMU */ 277
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
commit aa1f4345b5480502a4e61addf5c59d606fdbce8f Author: Sam Ravnborg sam@ravnborg.org Date: Mon Nov 30 22:09:29 2020 +0100
sh: Fix set but not used warnings with !CONFIG_MMU
Building fbdev drivers for sh with W=1 produces the following warning:
tmiofb.c: In function ‘tmiofb_remove’: tmiofb.c:805:21: warning: variable ‘par’ set but not used
This is with allmodconfig and ARCH=sh
This boiled down to iounmap() defined as empty for !CONFIG_MMU. Fix this by by adding "(void)addr;" to tell the compiler the argument to iounmap() should be considered used.
v4: - Fix build error of ethernet driver (kernel test robot) Added missing () around macro parameter
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: kernel test robot lkp@intel.com Cc: Thomas Zimmermann tzimmermann@suse.de Cc: Lee Jones lee.jones@linaro.org Cc: Rich Felker dalias@libc.org Cc: Arnd Bergmann arnd@arndb.de Cc: Geert Uytterhoeven geert+renesas@glider.be Cc: Mike Rapoport rppt@kernel.org Cc: Kuninori Morimoto kuninori.morimoto.gx@renesas.com Cc: Peter Zijlstra peterz@infradead.org Cc: Sam Ravnborg sam@ravnborg.org Cc: Andrew Morton akpm@linux-foundation.org
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 6d5c6463bc07..45082bcbd9aa 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -271,7 +271,7 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, #endif /* CONFIG_HAVE_IOREMAP_PROT */
#else /* CONFIG_MMU */ -#define iounmap(addr) do { } while (0) +#define iounmap(addr) do { (void)(addr); } while (0) #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) #endif /* CONFIG_MMU */
Hi "kernel test robot" On Sun, Dec 06, 2020 at 10:48:14PM +0100, Sam Ravnborg wrote:
Thanks for thee quick report - it was easy to reproduce. I hope this is enough for the robot to pick up the updated patch.
Sam
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
Fix kernel-doc warnings caused by a wrong parameter name blank_mode => blank
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Sam Ravnborg sam@ravnborg.org --- drivers/video/fbdev/bw2.c | 2 +- drivers/video/fbdev/cg3.c | 2 +- drivers/video/fbdev/cg6.c | 2 +- drivers/video/fbdev/ffb.c | 2 +- drivers/video/fbdev/leo.c | 2 +- drivers/video/fbdev/p9100.c | 2 +- drivers/video/fbdev/tcx.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/bw2.c b/drivers/video/fbdev/bw2.c index 0d9a6bb57a09..e7702fe1fe7d 100644 --- a/drivers/video/fbdev/bw2.c +++ b/drivers/video/fbdev/bw2.c @@ -116,7 +116,7 @@ struct bw2_par {
/** * bw2_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int diff --git a/drivers/video/fbdev/cg3.c b/drivers/video/fbdev/cg3.c index 77f6470ce665..bdcc3f6ab666 100644 --- a/drivers/video/fbdev/cg3.c +++ b/drivers/video/fbdev/cg3.c @@ -179,7 +179,7 @@ static int cg3_setcolreg(unsigned regno,
/** * cg3_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int cg3_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/cg6.c b/drivers/video/fbdev/cg6.c index a1c68cd48d7e..97ef43c25974 100644 --- a/drivers/video/fbdev/cg6.c +++ b/drivers/video/fbdev/cg6.c @@ -511,7 +511,7 @@ static int cg6_setcolreg(unsigned regno, /** * cg6_blank - Blanks the display. * - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int cg6_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c index 948b73184433..b3d580e57221 100644 --- a/drivers/video/fbdev/ffb.c +++ b/drivers/video/fbdev/ffb.c @@ -667,7 +667,7 @@ static int ffb_setcolreg(unsigned regno,
/** * ffb_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int ffb_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/leo.c b/drivers/video/fbdev/leo.c index 40b11cce0ad6..3eb0f3583f4f 100644 --- a/drivers/video/fbdev/leo.c +++ b/drivers/video/fbdev/leo.c @@ -308,7 +308,7 @@ static int leo_setcolreg(unsigned regno,
/** * leo_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int leo_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/p9100.c b/drivers/video/fbdev/p9100.c index 6da672e92643..4e88a0a195ad 100644 --- a/drivers/video/fbdev/p9100.c +++ b/drivers/video/fbdev/p9100.c @@ -175,7 +175,7 @@ static int p9100_setcolreg(unsigned regno,
/** * p9100_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int diff --git a/drivers/video/fbdev/tcx.c b/drivers/video/fbdev/tcx.c index 34b2e5b6e84a..1638a40fed22 100644 --- a/drivers/video/fbdev/tcx.c +++ b/drivers/video/fbdev/tcx.c @@ -196,7 +196,7 @@ static int tcx_setcolreg(unsigned regno,
/** * tcx_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
Add missing parameter and drop parameter that is not present
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Sam Ravnborg sam@ravnborg.org Cc: Andrzej Hajda a.hajda@samsung.com Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com --- drivers/video/fbdev/mmp/hw/mmp_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/mmp/hw/mmp_spi.c b/drivers/video/fbdev/mmp/hw/mmp_spi.c index 1911a47769b6..16401eb95c6c 100644 --- a/drivers/video/fbdev/mmp/hw/mmp_spi.c +++ b/drivers/video/fbdev/mmp/hw/mmp_spi.c @@ -17,8 +17,8 @@
/** * spi_write - write command to the SPI port + * @spi: the SPI device. * @data: can be 8/16/32-bit, MSB justified data to write. - * @len: data length. * * Wait bus transfer complete IRQ. * The caller is expected to perform the necessary locking.
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
Include own header to fix "function not declared" warnings.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Tony Prisk linux@prisktech.co.nz Cc: linux-arm-kernel@lists.infradead.org --- drivers/video/fbdev/wmt_ge_rops.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/video/fbdev/wmt_ge_rops.c b/drivers/video/fbdev/wmt_ge_rops.c index 2445cfe617a9..42255d27a1db 100644 --- a/drivers/video/fbdev/wmt_ge_rops.c +++ b/drivers/video/fbdev/wmt_ge_rops.c @@ -11,6 +11,7 @@ #include <linux/fb.h> #include <linux/platform_device.h> #include "core/fb_draw.h" +#include "wmt_ge_rops.h"
#define GE_COMMAND_OFF 0x00 #define GE_DEPTH_OFF 0x04
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
The goldfish_fb_acpi_match table is only used with ACPI enabled. Ifdef it out unless it is needed. This is a similar fix to what other acpi drivers do.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Sam Ravnborg sam@ravnborg.org --- drivers/video/fbdev/goldfishfb.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c index 9c83ec3f8e1f..2b885cd046fe 100644 --- a/drivers/video/fbdev/goldfishfb.c +++ b/drivers/video/fbdev/goldfishfb.c @@ -305,11 +305,13 @@ static const struct of_device_id goldfish_fb_of_match[] = { }; MODULE_DEVICE_TABLE(of, goldfish_fb_of_match);
+#ifdef CONFIG_ACPI static const struct acpi_device_id goldfish_fb_acpi_match[] = { { "GFSH0004", 0 }, { }, }; MODULE_DEVICE_TABLE(acpi, goldfish_fb_acpi_match); +#endif
static struct platform_driver goldfish_fb_driver = { .probe = goldfish_fb_probe,
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
The variable "x" was set but never used. Drop the redundant assignments.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Sam Ravnborg sam@ravnborg.org --- drivers/video/fbdev/gbefb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c index 31270a8986e8..c5b99a4861e8 100644 --- a/drivers/video/fbdev/gbefb.c +++ b/drivers/video/fbdev/gbefb.c @@ -198,7 +198,7 @@ static void gbe_reset(void) static void gbe_turn_off(void) { int i; - unsigned int val, x, y, vpixen_off; + unsigned int val, y, vpixen_off;
gbe_turned_on = 0;
@@ -249,7 +249,6 @@ static void gbe_turn_off(void)
for (i = 0; i < 100000; i++) { val = gbe->vt_xy; - x = GET_GBE_FIELD(VT_XY, X, val); y = GET_GBE_FIELD(VT_XY, Y, val); if (y < vpixen_off) break; @@ -260,7 +259,6 @@ static void gbe_turn_off(void) "gbefb: wait for vpixen_off timed out\n"); for (i = 0; i < 10000; i++) { val = gbe->vt_xy; - x = GET_GBE_FIELD(VT_XY, X, val); y = GET_GBE_FIELD(VT_XY, Y, val); if (y > vpixen_off) break;
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
screen_pitch was asssigned a value which was never used. Drop it to fix the warning
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Peter Jones pjones@redhat.com Cc: linux-fbdev@vger.kernel.org --- drivers/video/fbdev/efifb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index e57c00824965..b80ba3d2a9b8 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -139,7 +139,7 @@ static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width)
static void efifb_show_boot_graphics(struct fb_info *info) { - u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y; + u32 bmp_width, bmp_height, bmp_pitch, dst_x, y, src_y; struct screen_info *si = &screen_info; struct bmp_file_header *file_header; struct bmp_dib_header *dib_header; @@ -193,7 +193,6 @@ static void efifb_show_boot_graphics(struct fb_info *info) bmp_width = dib_header->width; bmp_height = abs(dib_header->height); bmp_pitch = round_up(3 * bmp_width, 4); - screen_pitch = si->lfb_linelength;
if ((file_header->bitmap_offset + bmp_pitch * bmp_height) > bgrt_image_size)
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
The controlfb driver has a number of dummy defines for IO operations. They were introduced in commit a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support").
The write variants did not use their value parameter in the dummy versions, resulting in set but not used warnings. Fix this by adding "(void)val" to silence the compiler.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Sam Ravnborg sam@ravnborg.org Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: "Gustavo A. R. Silva" gustavoars@kernel.org Cc: Michael Ellerman mpe@ellerman.id.au --- drivers/video/fbdev/controlfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c index 2df56bd303d2..509311471d51 100644 --- a/drivers/video/fbdev/controlfb.c +++ b/drivers/video/fbdev/controlfb.c @@ -64,9 +64,9 @@ #undef in_le32 #undef out_le32 #define in_8(addr) 0 -#define out_8(addr, val) +#define out_8(addr, val) (void)(val) #define in_le32(addr) 0 -#define out_le32(addr, val) +#define out_le32(addr, val) (void)(val) #define pgprot_cached_wthru(prot) (prot) #else static void invalid_vram_cache(void __force *addr)
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
Coverity reported:
Useless call (USELESS_CALL) side_effect_free: Calling SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex) is only useful for its return value, which is ignored.
And this is correct - so drop the call.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Reported-by: Colin Ian King colin.king@canonical.com Addresses-Coverity: ("Useless call") Cc: Colin Ian King colin.king@canonical.com Cc: Thomas Winischhofer thomas@winischhofer.net --- drivers/video/fbdev/sis/init.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c index b77ea1a8825a..b568c646a76c 100644 --- a/drivers/video/fbdev/sis/init.c +++ b/drivers/video/fbdev/sis/init.c @@ -2659,7 +2659,6 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo, if(SiS_Pr->UseCustomMode) { infoflag = SiS_Pr->CInfoFlag; } else { - SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex); if(ModeNo > 0x13) { infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag; }
Am 06.12.20 um 20:02 schrieb Sam Ravnborg:
Acked-by: Thomas Zimmermann tzimmermann@suse.de
dri-devel@lists.freedesktop.org