lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1422717706-7447-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date:	Sat, 31 Jan 2015 16:21:46 +0100
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Arnaud Patard <arnaud.patard@...-net.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	Aaro Koskinen <aaro.koskinen@....fi>,
	Thomas Gummerer <t.gummerer@...il.com>,
	Chaitanya Hazarey <c@...io>,
	Vitor Braga <vitorpybraga@...il.com>,
	Jiayi Ye <yejiayily@...il.com>, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] staging: xgifb: vb_setmode: Removed variables that is never used

Variable was assigned a value that was 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@...ctrumdigital.se>
---
 drivers/staging/xgifb/vb_setmode.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 1f6f699..6eb8c55 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -730,7 +730,6 @@ static void XGI_SetCRT1DE(unsigned short ModeIdIndex,
 		tempax |= 0x40;
 
 	xgifb_reg_and_or(pVBInfo->P3d4, 0x07, ~0x42, tempax);
-	data = xgifb_reg_get(pVBInfo->P3d4, 0x07);
 	tempax = 0;
 
 	if (tempbx & 0x04)
@@ -2245,9 +2244,8 @@ static unsigned char XGI_XG27GetPSCValue(struct vb_device_info *pVBInfo)
 static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
 		struct vb_device_info *pVBInfo)
 {
-	unsigned char CR4A, temp;
+	unsigned char temp;
 
-	CR4A = xgifb_reg_get(pVBInfo->P3d4, 0x4A);
 	tempbh &= 0x23;
 	tempbl &= 0x23;
 	xgifb_reg_and(pVBInfo->P3d4, 0x4A, ~tempbh); /* enable GPIO write */
@@ -2271,7 +2269,7 @@ static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
 static void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
 		struct vb_device_info *pVBInfo)
 {
-	unsigned char CR4A, temp;
+	unsigned char temp;
 	unsigned short tempbh0, tempbl0;
 
 	tempbh0 = tempbh;
@@ -2290,7 +2288,6 @@ static void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
 	}
 	xgifb_reg_and_or(pVBInfo->P3d4, 0xB4, ~tempbh0, tempbl0);
 
-	CR4A = xgifb_reg_get(pVBInfo->P3d4, 0x4A);
 	tempbh &= 0x03;
 	tempbl &= 0x03;
 	tempbh <<= 2;
@@ -5160,7 +5157,7 @@ unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
 	}
 	i--;
 	if ((pVBInfo->SetFlag & ProgrammingCRT2)) {
-		temp = XGI_AjustCRT2Rate(ModeIdIndex, RefreshRateTableIndex,
+		XGI_AjustCRT2Rate(ModeIdIndex, RefreshRateTableIndex,
 					 &i, pVBInfo);
 	}
 	return RefreshRateTableIndex + i;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ