diff mbox

video: fbdev: aty: atyfb_base.c: Cleaning up variable that is never used

Message ID 1404671093-17590-1-git-send-email-rickard_strandqvist@spectrumdigital.se (mailing list archive)
State New, archived
Headers show

Commit Message

Rickard Strandqvist July 6, 2014, 6:24 p.m. UTC
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/video/fbdev/aty/atyfb_base.c |    4 ----
 1 file changed, 4 deletions(-)

Comments

Mikulas Patocka July 7, 2014, 2:04 p.m. UTC | #1
On Sun, 6 Jul 2014, Rickard Strandqvist wrote:

> Variable ar assigned a value that is never used.
> I have also removed all the code that thereby serves no purpose.
> 
> This was found using a static code analysis program called cppcheck
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>

Acked-by: Mikulas Patocka <mpatocka@redhat.com>

> ---
>  drivers/video/fbdev/aty/atyfb_base.c |    4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
> index c3d0074..46188a4 100644
> --- a/drivers/video/fbdev/aty/atyfb_base.c
> +++ b/drivers/video/fbdev/aty/atyfb_base.c
> @@ -3088,7 +3088,6 @@ static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,
>  	if (dp == of_console_device) {
>  		struct fb_var_screeninfo *var = &default_var;
>  		unsigned int N, P, Q, M, T, R;
> -		u32 v_total, h_total;
>  		struct crtc crtc;
>  		u8 pll_regs[16];
>  		u8 clock_cntl;
> @@ -3104,9 +3103,6 @@ static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,
>  		crtc.gen_cntl = aty_ld_le32(CRTC_GEN_CNTL, par);
>  		aty_crtc_to_var(&crtc, var);
>  
> -		h_total = var->xres + var->right_margin + var->hsync_len + var->left_margin;
> -		v_total = var->yres + var->lower_margin + var->vsync_len + var->upper_margin;
> -
>  		/*
>  		 * Read the PLL to figure actual Refresh Rate.
>  		 */
> -- 
> 1.7.10.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
index c3d0074..46188a4 100644
--- a/drivers/video/fbdev/aty/atyfb_base.c
+++ b/drivers/video/fbdev/aty/atyfb_base.c
@@ -3088,7 +3088,6 @@  static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,
 	if (dp == of_console_device) {
 		struct fb_var_screeninfo *var = &default_var;
 		unsigned int N, P, Q, M, T, R;
-		u32 v_total, h_total;
 		struct crtc crtc;
 		u8 pll_regs[16];
 		u8 clock_cntl;
@@ -3104,9 +3103,6 @@  static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,
 		crtc.gen_cntl = aty_ld_le32(CRTC_GEN_CNTL, par);
 		aty_crtc_to_var(&crtc, var);
 
-		h_total = var->xres + var->right_margin + var->hsync_len + var->left_margin;
-		v_total = var->yres + var->lower_margin + var->vsync_len + var->upper_margin;
-
 		/*
 		 * Read the PLL to figure actual Refresh Rate.
 		 */