mbox series

[00/31] Rid W=1 warnings from Video

Message ID 20210113145009.1272040-1-lee.jones@linaro.org
Headers show
Series Rid W=1 warnings from Video | expand

Message

Lee Jones Jan. 13, 2021, 2:49 p.m. UTC
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

This patch-set clears all of the W=1 warnings currently residing
in drivers/video.

Lee Jones (31):
  video: fbdev: core: fbmon: Add missing description for 'specs'
  video: of_display_timing: Provide missing description for 'dt'
  video: fbdev: aty: atyfb_base: Remove superfluous code surrounding
    'dac_type'
  video: fbdev: aty: atyfb_base: Mark 'dac_type' as __maybe_unused
  video: of_videomode: Fix formatting in kernel-doc header
  video: fbdev: core: fb_notify: Demote non-conformant kernel-doc header
  video: fbdev: riva: fbdev: Fix some kernel-doc misdemeanours
  video: fbdev: sis: sis_main: Remove unused variable 'reg'
  video: fbdev: sis: Remove superfluous include of 'init.h'
  video: fbdev: riva: riva_hw: Remove a bunch of unused variables
  video: fbdev: sis: init: Remove four unused variables
  video: fbdev: sis: oem310: Remove some unused static const tables
  video: fbdev: nvidia: nv_setup: Remove a couple of unused 'tmp'
    variables
  video: fbdev: aty: mach64_ct: Remove some set but unused variables
  video: fbdev: via: lcd: Remove unused variable 'mode_crt_table'
  video: fbdev: pm2fb: Fix some kernel-doc formatting issues
  video: fbdev: aty: radeon_monitor: Remove unused variable 'mon_types'
  video: fbdev: neofb: Remove unused variable 'CursorMem'
  video: fbdev: tdfxfb: Remove unused variable 'tmp'
  video: fbdev: core: fbcon: Mark 'pending' as __maybe_unused
  video: fbdev: sstfb: Mark 3 debug variables as __maybe_unused
  video: fbdev: cirrusfb: Remove unused variable 'dummy' from 'WHDR()'
  video: fbdev: s1d13xxxfb: Mark debug variables as __maybe_unused
  video: fbdev: s3c-fb: Fix some kernel-doc misdemeanours
  video: fbdev: mx3fb: Remove unused variable 'enabled'
  video: fbdev: riva: riva_hw: Remove set but unused variables 'vus_p'
    and 'vus_n'
  video: fbdev: sis: init: Remove unused variables 'cr_data2', 'VT' and
    'HT'
  video: fbdev: cirrusfb: Add description for 'info' and correct
    spelling of 'regbase'
  video: fbdev: s1d13xxxfb: Function name must be on the 2nd line in
    kernel-doc
  video: fbdev: s3c-fb: Remove unused variable 'var' from
    's3c_fb_probe_win()'
  video: fbdev: mx3fb: Fix some kernel-doc issues

 drivers/video/fbdev/aty/atyfb_base.c     |  5 +---
 drivers/video/fbdev/aty/mach64_ct.c      | 19 ++-----------
 drivers/video/fbdev/aty/radeon_monitor.c |  4 +--
 drivers/video/fbdev/cirrusfb.c           | 20 +++++++-------
 drivers/video/fbdev/core/fb_notify.c     |  3 +--
 drivers/video/fbdev/core/fbcon.c         |  2 +-
 drivers/video/fbdev/core/fbmon.c         |  2 +-
 drivers/video/fbdev/mx3fb.c              | 11 ++++----
 drivers/video/fbdev/neofb.c              |  5 ----
 drivers/video/fbdev/nvidia/nv_setup.c    |  8 ++----
 drivers/video/fbdev/pm2fb.c              | 12 ++++-----
 drivers/video/fbdev/riva/fbdev.c         | 15 ++++-------
 drivers/video/fbdev/riva/riva_hw.c       | 30 +++++++--------------
 drivers/video/fbdev/s1d13xxxfb.c         |  5 ++--
 drivers/video/fbdev/s3c-fb.c             | 11 ++++----
 drivers/video/fbdev/sis/init.c           | 34 +++++-------------------
 drivers/video/fbdev/sis/oem310.h         | 20 --------------
 drivers/video/fbdev/sis/sis.h            |  1 -
 drivers/video/fbdev/sis/sis_main.c       |  9 +++----
 drivers/video/fbdev/sstfb.c              |  2 +-
 drivers/video/fbdev/tdfxfb.c             |  4 +--
 drivers/video/fbdev/via/lcd.c            |  4 +--
 drivers/video/of_display_timing.c        |  1 +
 drivers/video/of_videomode.c             | 10 +++----
 24 files changed, 72 insertions(+), 165 deletions(-)

Cc: Alan Cox <alan@redhat.com>
Cc: Alex Dewar <alex.dewar90@gmail.com>
Cc: Alex Kern <alex.kern@gmx.de>
Cc: Ani Joshi <ajoshi@shell.unixbox.com>
Cc: Ani Joshi <ajoshi@unixbox.com>
Cc: Anthony Tong <atong@uiuc.edu>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Brad Douglas <brad@neruo.com>
Cc: carter@compsci.bristol.ac.uk
Cc: daniel.mantione@freepascal.org
Cc: dri-devel@lists.freedesktop.org
Cc: "Eddie C. Dost" <ecd@skynet.be>
Cc: Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
Cc: Emmanuel Marty <core@ggi-project.org>
Cc: Evgeny Novikov <novikov@ispras.ru>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Frodo Looijaard <frodol@dds.nl>
Cc: Gerd Knorr <kraxel@goldbach.in-berlin.de>
Cc: Ghozlane Toumi <gtoumi@laposte.net>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Hannu Mallat <hmallat@cc.hut.fi>
Cc: Helge Deller <deller@gmx.de>
Cc: Ilario Nardinocchi <nardinoc@CS.UniBO.IT>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Jakub Jelinek <jj@ultra.linux.cz>
Cc: James Simmons <jsimmons@infradead.org>
Cc: James Simmons <jsimmons@users.sf.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Jes Sorensen <jds@kom.auc.dk>
Cc: Jim Hague <jim.hague@acm.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: John Fremlin <vii@users.sourceforge.net>
Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Cc: linux-fbdev@vger.kernel.org
Cc: "Mark D. Studebaker" <mdsxyz123@yahoo.com>
Cc: Martin Mares <mj@ucw.cz>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Oliver Kropp <dok@directfb.org>
Cc: Paul Mundt <lethal@chaoticdreams.org>
Cc: Philip Edelbrock <phil@netroedge.com>
Cc: Ralph Metzler <rjkm@thp.uni-koeln.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Software Engineering <lg@denx.de>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: Thibaut VARENE <varenet@parisc-linux.org>
Cc: "Thomas J. Moore" <dark@mama.indstate.edu>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Urs Ganse <ursg@uni.de>
Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: William Rucklidge <wjr@cs.cornell.edu>

Comments

Lee Jones Jan. 13, 2021, 3:45 p.m. UTC | #1
On Wed, 13 Jan 2021, Daniël Mantione wrote:

> Hi,
> 
> If I remember well, the removed lines have to do with the VGA/accelerator
> mode of the chip. The current driver always runs the chip in accelerator
> mode. Suppose you would want to support high resolution hardware text modes
> with the driver (fbdev bpp=0), then you would need to switch the chip into
> VGA mode mode and then the removed lines become relevant.
> 
> I did some experiments with this when I was working on the driver, but
> because the documentation was silent about the behaviour of extended CRTC
> registers in VGA mode, I failed to make hardware text modes to work
> properly.
> 
> The #if 0 was there so code was already there in case me or someone else
> would pick it up again.

This code has been commented out for *at least* 16 years.

Probably time to let it go. :)

> Best regards,
> 
> Daniël Mantione
> 
> Op Wed, 13 Jan 2021, schreef Lee Jones:
> 
> > Fixes the following W=1 kernel build warning(s):
> > 
> > drivers/video/fbdev/aty/mach64_ct.c: In function ‘aty_init_pll_ct’:
> > drivers/video/fbdev/aty/mach64_ct.c:405:46: warning: variable ‘vga_dsp_on_off’ set but not used [-Wunused-but-set-variable]
> > drivers/video/fbdev/aty/mach64_ct.c:405:30: warning: variable ‘vga_dsp_config’ set but not used [-Wunused-but-set-variable]
> > drivers/video/fbdev/aty/mach64_ct.c:405:18: warning: variable ‘dsp_on_off’ set but not used [-Wunused-but-set-variable]
> > 
> > Cc: daniel.mantione@freepascal.org
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: linux-fbdev@vger.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> > drivers/video/fbdev/aty/mach64_ct.c | 19 ++-----------------
> > 1 file changed, 2 insertions(+), 17 deletions(-)
> > 
> > diff --git a/drivers/video/fbdev/aty/mach64_ct.c b/drivers/video/fbdev/aty/mach64_ct.c
> > index f87cc81f4fa2b..23eececa1e9d7 100644
> > --- a/drivers/video/fbdev/aty/mach64_ct.c
> > +++ b/drivers/video/fbdev/aty/mach64_ct.c
> > @@ -402,7 +402,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll)
> > 	struct atyfb_par *par = (struct atyfb_par *) info->par;
> > 	u8 mpost_div, xpost_div, sclk_post_div_real;
> > 	u32 q, memcntl, trp;
> > -	u32 dsp_config, dsp_on_off, vga_dsp_config, vga_dsp_on_off;
> > +	u32 dsp_config;
> > #ifdef DEBUG
> > 	int pllmclk, pllsclk;
> > #endif
> > @@ -488,25 +488,10 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll)
> > 
> > 	/* Allow BIOS to override */
> > 	dsp_config = aty_ld_le32(DSP_CONFIG, par);
> > -	dsp_on_off = aty_ld_le32(DSP_ON_OFF, par);
> > -	vga_dsp_config = aty_ld_le32(VGA_DSP_CONFIG, par);
> > -	vga_dsp_on_off = aty_ld_le32(VGA_DSP_ON_OFF, par);
> > 
> > 	if (dsp_config)
> > 		pll->ct.dsp_loop_latency = (dsp_config & DSP_LOOP_LATENCY) >> 16;
> > -#if 0
> > -	FIXME: is it relevant for us?
> > -	if ((!dsp_on_off && !M64_HAS(RESET_3D)) ||
> > -		((dsp_on_off == vga_dsp_on_off) &&
> > -		(!dsp_config || !((dsp_config ^ vga_dsp_config) & DSP_XCLKS_PER_QW)))) {
> > -		vga_dsp_on_off &= VGA_DSP_OFF;
> > -		vga_dsp_config &= VGA_DSP_XCLKS_PER_QW;
> > -		if (ATIDivide(vga_dsp_on_off, vga_dsp_config, 5, 1) > 24)
> > -			pll->ct.fifo_size = 32;
> > -		else
> > -			pll->ct.fifo_size = 24;
> > -	}
> > -#endif
> > +
> > 	/* Exit if the user does not want us to tamper with the clock
> > 	rates of her chip. */
> > 	if (par->mclk_per == 0) {
Lee Jones Jan. 13, 2021, 8:25 p.m. UTC | #2
On Wed, 13 Jan 2021, Sam Ravnborg wrote:

> Hi Lee,
> 
> On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> > 
> > This patch-set clears all of the W=1 warnings currently residing
> > in drivers/video.
> 
> I am sorry to say that I expect most of your nice patches to clash
> with patches that is already present in drm-misc-next.
> 
> drivers/video/ are warning free with W=1 in drm-misc-next today.
> 
> I do not know why drm-misc-next is not yet pullled into linux-next.

Well that kinda sucks.  What are the chances of that?

Most of my patches fix issues that have been there for years!
Jani Nikula Jan. 14, 2021, 9:04 a.m. UTC | #3
On Wed, 13 Jan 2021, Lee Jones <lee.jones@linaro.org> wrote:
> On Wed, 13 Jan 2021, Sam Ravnborg wrote:
>
>> Hi Lee,
>> 
>> On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote:
>> > This set is part of a larger effort attempting to clean-up W=1
>> > kernel builds, which are currently overwhelmingly riddled with
>> > niggly little warnings.
>> > 
>> > This patch-set clears all of the W=1 warnings currently residing
>> > in drivers/video.
>> 
>> I am sorry to say that I expect most of your nice patches to clash
>> with patches that is already present in drm-misc-next.
>> 
>> drivers/video/ are warning free with W=1 in drm-misc-next today.
>> 
>> I do not know why drm-misc-next is not yet pullled into linux-next.
>
> Well that kinda sucks.  What are the chances of that?
>
> Most of my patches fix issues that have been there for years!

We auto-update the for-linux-next and for-linux-next-fixes branches, and
they seem to be up-to-date [1].

How recent are the fixes, maybe because of this: [2]?

BR,
Jani.


[1] https://cgit.freedesktop.org/drm/drm-misc
[2] http://lore.kernel.org/r/20210114113107.622102e0@canb.auug.org.au
Daniel Vetter Jan. 14, 2021, 9:11 a.m. UTC | #4
On Thu, Jan 14, 2021 at 10:04 AM Jani Nikula
<jani.nikula@linux.intel.com> wrote:
>
> On Wed, 13 Jan 2021, Lee Jones <lee.jones@linaro.org> wrote:
> > On Wed, 13 Jan 2021, Sam Ravnborg wrote:
> >
> >> Hi Lee,
> >>
> >> On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote:
> >> > This set is part of a larger effort attempting to clean-up W=1
> >> > kernel builds, which are currently overwhelmingly riddled with
> >> > niggly little warnings.
> >> >
> >> > This patch-set clears all of the W=1 warnings currently residing
> >> > in drivers/video.
> >>
> >> I am sorry to say that I expect most of your nice patches to clash
> >> with patches that is already present in drm-misc-next.
> >>
> >> drivers/video/ are warning free with W=1 in drm-misc-next today.
> >>
> >> I do not know why drm-misc-next is not yet pullled into linux-next.
> >
> > Well that kinda sucks.  What are the chances of that?
> >
> > Most of my patches fix issues that have been there for years!

I planned to go through them all today, let's see what's still needed.

> We auto-update the for-linux-next and for-linux-next-fixes branches, and
> they seem to be up-to-date [1].

It only happened last week instead of right after -rc1 due to some
confusion, but it should have been in linux-next for a few days
already.

> How recent are the fixes, maybe because of this: [2]?
>
> BR,
> Jani.
>
>
> [1] https://cgit.freedesktop.org/drm/drm-misc
> [2] http://lore.kernel.org/r/20210114113107.622102e0@canb.auug.org.au

Patch for that just got committted, so this shouldn't be too big a
window for drm-misc-next to be excluded should have been very small.
-Daniel

>
> --
> Jani Nikula, Intel Open Source Graphics Center
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter Jan. 14, 2021, 9:54 a.m. UTC | #5
On Thu, Jan 14, 2021 at 10:11:01AM +0100, Daniel Vetter wrote:
> On Thu, Jan 14, 2021 at 10:04 AM Jani Nikula
> <jani.nikula@linux.intel.com> wrote:
> >
> > On Wed, 13 Jan 2021, Lee Jones <lee.jones@linaro.org> wrote:
> > > On Wed, 13 Jan 2021, Sam Ravnborg wrote:
> > >
> > >> Hi Lee,
> > >>
> > >> On Wed, Jan 13, 2021 at 02:49:38PM +0000, Lee Jones wrote:
> > >> > This set is part of a larger effort attempting to clean-up W=1
> > >> > kernel builds, which are currently overwhelmingly riddled with
> > >> > niggly little warnings.
> > >> >
> > >> > This patch-set clears all of the W=1 warnings currently residing
> > >> > in drivers/video.
> > >>
> > >> I am sorry to say that I expect most of your nice patches to clash
> > >> with patches that is already present in drm-misc-next.
> > >>
> > >> drivers/video/ are warning free with W=1 in drm-misc-next today.
> > >>
> > >> I do not know why drm-misc-next is not yet pullled into linux-next.
> > >
> > > Well that kinda sucks.  What are the chances of that?
> > >
> > > Most of my patches fix issues that have been there for years!
> 
> I planned to go through them all today, let's see what's still needed.

First bunch of patches are all not needed anymore, I think this is quicker
if you're rebasing. Unfortunate this happened :-/
-Daniel

> 
> > We auto-update the for-linux-next and for-linux-next-fixes branches, and
> > they seem to be up-to-date [1].
> 
> It only happened last week instead of right after -rc1 due to some
> confusion, but it should have been in linux-next for a few days
> already.
> 
> > How recent are the fixes, maybe because of this: [2]?
> >
> > BR,
> > Jani.
> >
> >
> > [1] https://cgit.freedesktop.org/drm/drm-misc
> > [2] http://lore.kernel.org/r/20210114113107.622102e0@canb.auug.org.au
> 
> Patch for that just got committted, so this shouldn't be too big a
> window for drm-misc-next to be excluded should have been very small.
> -Daniel
> 
> >
> > --
> > Jani Nikula, Intel Open Source Graphics Center
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> 
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch