linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
	Thomas Winischhofer <thomas@winischhofer.net>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: [PATCH 11/31] video: fbdev: sis: init: Remove four unused variables
Date: Wed, 13 Jan 2021 14:49:49 +0000	[thread overview]
Message-ID: <20210113145009.1272040-12-lee.jones@linaro.org> (raw)
In-Reply-To: <20210113145009.1272040-1-lee.jones@linaro.org>

Fixes the following W=1 kernel build warning(s):

 drivers/video/fbdev/sis/init.c: In function ‘SiS_SetCRT1ModeRegs’:
 drivers/video/fbdev/sis/init.c:2651:49: warning: variable ‘resindex’ set but not used [-Wunused-but-set-variable]
 drivers/video/fbdev/sis/init.c: In function ‘SiS_Generic_ConvertCRData’:
 drivers/video/fbdev/sis/init.c:3544:19: warning: variable ‘A’ set but not used [-Wunused-but-set-variable]
 drivers/video/fbdev/sis/init.c:3542:34: warning: variable ‘VBS’ set but not used [-Wunused-but-set-variable]
 drivers/video/fbdev/sis/init.c:3541:34: warning: variable ‘HBS’ set but not used [-Wunused-but-set-variable]

Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/video/fbdev/sis/init.c | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c
index fde27feae5d0c..4510272ad297a 100644
--- a/drivers/video/fbdev/sis/init.c
+++ b/drivers/video/fbdev/sis/init.c
@@ -2648,7 +2648,7 @@ static void
 SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
 		unsigned short ModeIdIndex, unsigned short RRTI)
 {
-   unsigned short data, infoflag = 0, modeflag, resindex;
+   unsigned short data, infoflag = 0, modeflag;
 #ifdef CONFIG_FB_SIS_315
    unsigned char  *ROMAddr  = SiS_Pr->VirtualRomBase;
    unsigned short data2, data3;
@@ -2659,7 +2659,7 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
    if(SiS_Pr->UseCustomMode) {
       infoflag = SiS_Pr->CInfoFlag;
    } else {
-      resindex = SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
+      SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
       if(ModeNo > 0x13) {
 	 infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag;
       }
@@ -3538,16 +3538,15 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
 			struct fb_var_screeninfo *var, bool writeres
 )
 {
-   unsigned short HRE, HBE, HRS, HBS, HDE, HT;
-   unsigned short VRE, VBE, VRS, VBS, VDE, VT;
+   unsigned short HRE, HBE, HRS, HDE, HT;
+   unsigned short VRE, VBE, VRS, VDE, VT;
    unsigned char  sr_data, cr_data, cr_data2;
-   int            A, B, C, D, E, F, temp;
+   int            B, C, D, E, F, temp;
 
    sr_data = crdata[14];
 
    /* Horizontal total */
    HT =  crdata[0] | ((unsigned short)(sr_data & 0x03) << 8);
-   A = HT + 5;
 
    /* Horizontal display enable end */
    HDE = crdata[1] | ((unsigned short)(sr_data & 0x0C) << 6);
@@ -3557,9 +3556,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
    HRS = crdata[4] | ((unsigned short)(sr_data & 0xC0) << 2);
    F = HRS - E - 3;
 
-   /* Horizontal blank start */
-   HBS = crdata[2] | ((unsigned short)(sr_data & 0x30) << 4);
-
    sr_data = crdata[15];
    cr_data = crdata[5];
 
@@ -3593,7 +3589,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
 	 ((unsigned short)(cr_data & 0x01) << 8) |
 	 ((unsigned short)(cr_data & 0x20) << 4) |
 	 ((unsigned short)(sr_data & 0x01) << 10);
-   A = VT + 2;
 
    /* Vertical display enable end */
    VDE = crdata[10] |
@@ -3611,12 +3606,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
 
    cr_data2 = (crdata[16] & 0x01) << 5;
 
-   /* Vertical blank start */
-   VBS = crdata[11] |
-	 ((unsigned short)(cr_data  & 0x08) << 5) |
-	 ((unsigned short)(cr_data2 & 0x20) << 4) |
-	 ((unsigned short)(sr_data  & 0x04) << 8);
-
    /* Vertical blank end */
    VBE = crdata[12] | ((unsigned short)(sr_data & 0x10) << 4);
    temp = VBE - ((E - 1) & 511);
-- 
2.25.1


  parent reply	other threads:[~2021-01-13 14:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 14:49 [PATCH 00/31] Rid W=1 warnings from Video Lee Jones
2021-01-13 14:49 ` [PATCH 01/31] video: fbdev: core: fbmon: Add missing description for 'specs' Lee Jones
2021-01-13 14:49 ` [PATCH 02/31] video: of_display_timing: Provide missing description for 'dt' Lee Jones
2021-01-13 14:49 ` [PATCH 03/31] video: fbdev: aty: atyfb_base: Remove superfluous code surrounding 'dac_type' Lee Jones
2021-01-13 14:49 ` [PATCH 04/31] video: fbdev: aty: atyfb_base: Mark 'dac_type' as __maybe_unused Lee Jones
2021-01-13 14:49 ` [PATCH 05/31] video: of_videomode: Fix formatting in kernel-doc header Lee Jones
2021-01-13 14:49 ` [PATCH 06/31] video: fbdev: core: fb_notify: Demote non-conformant " Lee Jones
2021-01-13 14:49 ` [PATCH 07/31] video: fbdev: riva: fbdev: Fix some kernel-doc misdemeanours Lee Jones
2021-01-13 14:49 ` [PATCH 08/31] video: fbdev: sis: sis_main: Remove unused variable 'reg' Lee Jones
2021-01-13 14:49 ` [PATCH 09/31] video: fbdev: sis: Remove superfluous include of 'init.h' Lee Jones
2021-01-13 14:49 ` [PATCH 10/31] video: fbdev: riva: riva_hw: Remove a bunch of unused variables Lee Jones
2021-01-13 14:49 ` Lee Jones [this message]
2021-01-13 14:49 ` [PATCH 12/31] video: fbdev: sis: oem310: Remove some unused static const tables Lee Jones
2021-01-13 14:49 ` [PATCH 13/31] video: fbdev: nvidia: nv_setup: Remove a couple of unused 'tmp' variables Lee Jones
2021-01-13 14:49 ` [PATCH 14/31] video: fbdev: aty: mach64_ct: Remove some set but unused variables Lee Jones
2021-01-13 15:24   ` Daniël Mantione
2021-01-13 15:45     ` Lee Jones
2021-01-13 14:49 ` [PATCH 15/31] video: fbdev: via: lcd: Remove unused variable 'mode_crt_table' Lee Jones
2021-01-13 14:49 ` [PATCH 16/31] video: fbdev: pm2fb: Fix some kernel-doc formatting issues Lee Jones
2021-01-13 14:49 ` [PATCH 17/31] video: fbdev: aty: radeon_monitor: Remove unused variable 'mon_types' Lee Jones
2021-01-13 14:49 ` [PATCH 18/31] video: fbdev: neofb: Remove unused variable 'CursorMem' Lee Jones
2021-01-13 14:49 ` [PATCH 19/31] video: fbdev: tdfxfb: Remove unused variable 'tmp' Lee Jones
2021-01-13 14:49 ` [PATCH 20/31] video: fbdev: core: fbcon: Mark 'pending' as __maybe_unused Lee Jones
2021-01-13 14:49 ` [PATCH 21/31] video: fbdev: sstfb: Mark 3 debug variables " Lee Jones
2021-01-13 14:50 ` [PATCH 22/31] video: fbdev: cirrusfb: Remove unused variable 'dummy' from 'WHDR()' Lee Jones
2021-01-13 14:50 ` [PATCH 23/31] video: fbdev: s1d13xxxfb: Mark debug variables as __maybe_unused Lee Jones
2021-01-13 14:50 ` [PATCH 24/31] video: fbdev: s3c-fb: Fix some kernel-doc misdemeanours Lee Jones
2021-01-13 20:07   ` Jingoo Han
2021-01-13 14:50 ` [PATCH 25/31] video: fbdev: mx3fb: Remove unused variable 'enabled' Lee Jones
2021-01-13 14:50 ` [PATCH 26/31] video: fbdev: riva: riva_hw: Remove set but unused variables 'vus_p' and 'vus_n' Lee Jones
2021-01-13 14:50 ` [PATCH 27/31] video: fbdev: sis: init: Remove unused variables 'cr_data2', 'VT' and 'HT' Lee Jones
2021-01-13 14:50 ` [PATCH 28/31] video: fbdev: cirrusfb: Add description for 'info' and correct spelling of 'regbase' Lee Jones
2021-01-13 14:50 ` [PATCH 29/31] video: fbdev: s1d13xxxfb: Function name must be on the 2nd line in kernel-doc Lee Jones
2021-01-13 14:50 ` [PATCH 30/31] video: fbdev: s3c-fb: Remove unused variable 'var' from 's3c_fb_probe_win()' Lee Jones
2021-01-13 20:09   ` Jingoo Han
2021-01-13 14:50 ` [PATCH 31/31] video: fbdev: mx3fb: Fix some kernel-doc issues Lee Jones
2021-01-13 19:01 ` [PATCH 00/31] Rid W=1 warnings from Video Sam Ravnborg
2021-01-13 20:25   ` Lee Jones
2021-01-14  9:04     ` Jani Nikula
2021-01-14  9:11       ` Daniel Vetter
2021-01-14  9:54         ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113145009.1272040-12-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@winischhofer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).