Message ID | 20201128224114.1033617-28-sam@ravnborg.org |
---|---|
State | Superseded |
Headers | show |
Series | drivers/video: W=1 warning fixes | expand |
Hi Am 28.11.20 um 23:41 schrieb Sam Ravnborg: > Fix warnings: > - drop kernel-doc for the two debug functions to avoid the warnings > - delete unused code > > v2: > - Updated subject (Lee) > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Thomas Zimemrmann <tzimmermann@suse.de> > Cc: Sam Ravnborg <sam@ravnborg.org> > Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Cc: Mike Rapoport <rppt@kernel.org> > Cc: Lee Jones <lee.jones@linaro.org> > --- > drivers/video/fbdev/cirrusfb.c | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > > diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c > index e9027172c0f5..93802abbbc72 100644 > --- a/drivers/video/fbdev/cirrusfb.c > +++ b/drivers/video/fbdev/cirrusfb.c > @@ -2463,8 +2463,6 @@ static void AttrOn(const struct cirrusfb_info *cinfo) > */ > static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) > { > - unsigned char dummy; > - > if (is_laguna(cinfo)) > return; > if (cinfo->btype == BT_PICASSO) { > @@ -2473,18 +2471,18 @@ static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) > WGen(cinfo, VGA_PEL_MSK, 0x00); > udelay(200); > /* next read dummy from pixel address (3c8) */ > - dummy = RGen(cinfo, VGA_PEL_IW); > + RGen(cinfo, VGA_PEL_IW); I hope these kinds of changes do not turn into an endless stream of warnings from static ananlysis. I git an email with that today about such a call. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> > udelay(200); > } > /* now do the usual stuff to access the HDR */ > > - dummy = RGen(cinfo, VGA_PEL_MSK); > + RGen(cinfo, VGA_PEL_MSK); > udelay(200); > - dummy = RGen(cinfo, VGA_PEL_MSK); > + RGen(cinfo, VGA_PEL_MSK); > udelay(200); > - dummy = RGen(cinfo, VGA_PEL_MSK); > + RGen(cinfo, VGA_PEL_MSK); > udelay(200); > - dummy = RGen(cinfo, VGA_PEL_MSK); > + RGen(cinfo, VGA_PEL_MSK); > udelay(200); > > WGen(cinfo, VGA_PEL_MSK, val); > @@ -2492,7 +2490,7 @@ static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) > > if (cinfo->btype == BT_PICASSO) { > /* now first reset HDR access counter */ > - dummy = RGen(cinfo, VGA_PEL_IW); > + RGen(cinfo, VGA_PEL_IW); > udelay(200); > > /* and at the end, restore the mask value */ > @@ -2800,9 +2798,9 @@ static void bestclock(long freq, int *nom, int *den, int *div) > > #ifdef CIRRUSFB_DEBUG > > -/** > +/* > * cirrusfb_dbg_print_regs > - * @base: If using newmmio, the newmmio base address, otherwise %NULL > + * @regbase: If using newmmio, the newmmio base address, otherwise %NULL > * @reg_class: type of registers to read: %CRT, or %SEQ > * > * DESCRIPTION: > @@ -2847,7 +2845,7 @@ static void cirrusfb_dbg_print_regs(struct fb_info *info, > va_end(list); > } > > -/** > +/* > * cirrusfb_dbg_reg_dump > * @base: If using newmmio, the newmmio base address, otherwise %NULL > * >
Hi Thomas. On Tue, Dec 01, 2020 at 03:21:59PM +0100, Thomas Zimmermann wrote: > Hi > > Am 28.11.20 um 23:41 schrieb Sam Ravnborg: > > Fix warnings: > > - drop kernel-doc for the two debug functions to avoid the warnings > > - delete unused code > > > > v2: > > - Updated subject (Lee) > > > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > > Cc: Thomas Zimemrmann <tzimmermann@suse.de> > > Cc: Sam Ravnborg <sam@ravnborg.org> > > Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > > Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com> > > Cc: Jani Nikula <jani.nikula@intel.com> > > Cc: Mike Rapoport <rppt@kernel.org> > > Cc: Lee Jones <lee.jones@linaro.org> > > --- > > drivers/video/fbdev/cirrusfb.c | 20 +++++++++----------- > > 1 file changed, 9 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c > > index e9027172c0f5..93802abbbc72 100644 > > --- a/drivers/video/fbdev/cirrusfb.c > > +++ b/drivers/video/fbdev/cirrusfb.c > > @@ -2463,8 +2463,6 @@ static void AttrOn(const struct cirrusfb_info *cinfo) > > */ > > static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) > > { > > - unsigned char dummy; > > - > > if (is_laguna(cinfo)) > > return; > > if (cinfo->btype == BT_PICASSO) { > > @@ -2473,18 +2471,18 @@ static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) > > WGen(cinfo, VGA_PEL_MSK, 0x00); > > udelay(200); > > /* next read dummy from pixel address (3c8) */ > > - dummy = RGen(cinfo, VGA_PEL_IW); > > + RGen(cinfo, VGA_PEL_IW); > > I hope these kinds of changes do not turn into an endless stream of warnings > from static ananlysis. I git an email with that today about such a call. Got the same mail, will type a patch for it. > > Acked-by: Thomas Zimmermann <tzimmermann@suse.de> This and the other acked patches are now applied to drm-misc-next. Building for a few more architectures turned up new warnings, so I will prepare a new set of patches with comments addressed. Sam
diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c index e9027172c0f5..93802abbbc72 100644 --- a/drivers/video/fbdev/cirrusfb.c +++ b/drivers/video/fbdev/cirrusfb.c @@ -2463,8 +2463,6 @@ static void AttrOn(const struct cirrusfb_info *cinfo) */ static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) { - unsigned char dummy; - if (is_laguna(cinfo)) return; if (cinfo->btype == BT_PICASSO) { @@ -2473,18 +2471,18 @@ static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) WGen(cinfo, VGA_PEL_MSK, 0x00); udelay(200); /* next read dummy from pixel address (3c8) */ - dummy = RGen(cinfo, VGA_PEL_IW); + RGen(cinfo, VGA_PEL_IW); udelay(200); } /* now do the usual stuff to access the HDR */ - dummy = RGen(cinfo, VGA_PEL_MSK); + RGen(cinfo, VGA_PEL_MSK); udelay(200); - dummy = RGen(cinfo, VGA_PEL_MSK); + RGen(cinfo, VGA_PEL_MSK); udelay(200); - dummy = RGen(cinfo, VGA_PEL_MSK); + RGen(cinfo, VGA_PEL_MSK); udelay(200); - dummy = RGen(cinfo, VGA_PEL_MSK); + RGen(cinfo, VGA_PEL_MSK); udelay(200); WGen(cinfo, VGA_PEL_MSK, val); @@ -2492,7 +2490,7 @@ static void WHDR(const struct cirrusfb_info *cinfo, unsigned char val) if (cinfo->btype == BT_PICASSO) { /* now first reset HDR access counter */ - dummy = RGen(cinfo, VGA_PEL_IW); + RGen(cinfo, VGA_PEL_IW); udelay(200); /* and at the end, restore the mask value */ @@ -2800,9 +2798,9 @@ static void bestclock(long freq, int *nom, int *den, int *div) #ifdef CIRRUSFB_DEBUG -/** +/* * cirrusfb_dbg_print_regs - * @base: If using newmmio, the newmmio base address, otherwise %NULL + * @regbase: If using newmmio, the newmmio base address, otherwise %NULL * @reg_class: type of registers to read: %CRT, or %SEQ * * DESCRIPTION: @@ -2847,7 +2845,7 @@ static void cirrusfb_dbg_print_regs(struct fb_info *info, va_end(list); } -/** +/* * cirrusfb_dbg_reg_dump * @base: If using newmmio, the newmmio base address, otherwise %NULL *
Fix warnings: - drop kernel-doc for the two debug functions to avoid the warnings - delete unused code v2: - Updated subject (Lee) Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Zimemrmann <tzimmermann@suse.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Lee Jones <lee.jones@linaro.org> --- drivers/video/fbdev/cirrusfb.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)