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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1422717239-6043-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date:	Sat, 31 Jan 2015 16:13:59 +0100
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Lior Dotan <liodot@...il.com>,
	Christopher Harrer <charrer@...critech.com>
Cc:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	David Matlack <matlackdavid@...il.com>,
	Monam Agarwal <monamagarwal123@...il.com>,
	Dilek Uzulmez <dilekuzulmez@...il.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Sean Cleator <seancleator@...mail.co.uk>,
	Vincent Heuken <me@...centheuken.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: slicoss: slicoss: 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/slicoss/slicoss.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 42d62ef..41b3687 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1395,14 +1395,11 @@ static void slic_cmdq_reset(struct adapter *adapter)
 {
 	struct slic_hostcmd *hcmd;
 	struct sk_buff *skb;
-	u32 outstanding;
 
 	spin_lock_irqsave(&adapter->cmdq_free.lock.lock,
 			adapter->cmdq_free.lock.flags);
 	spin_lock_irqsave(&adapter->cmdq_done.lock.lock,
 			adapter->cmdq_done.lock.flags);
-	outstanding = adapter->cmdq_all.count - adapter->cmdq_done.count;
-	outstanding -= adapter->cmdq_free.count;
 	hcmd = adapter->cmdq_all.head;
 	while (hcmd) {
 		if (hcmd->busy) {
@@ -1728,7 +1725,6 @@ static u32 slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb)
  */
 static void slic_link_event_handler(struct adapter *adapter)
 {
-	int status;
 	struct slic_shmem *pshmem;
 
 	if (adapter->state != ADAPT_UP) {
@@ -1739,13 +1735,13 @@ static void slic_link_event_handler(struct adapter *adapter)
 	pshmem = (struct slic_shmem *)(unsigned long)adapter->phys_shmem;
 
 #if BITS_PER_LONG == 64
-	status = slic_upr_request(adapter,
+	slic_upr_request(adapter,
 				  SLIC_UPR_RLSR,
 				  SLIC_GET_ADDR_LOW(&pshmem->linkstatus),
 				  SLIC_GET_ADDR_HIGH(&pshmem->linkstatus),
 				  0, 0);
 #else
-	status = slic_upr_request(adapter, SLIC_UPR_RLSR,
+	slic_upr_request(adapter, SLIC_UPR_RLSR,
 		(u32) &pshmem->linkstatus,	/* no 4GB wrap guaranteed */
 				  0, 0, 0);
 #endif
@@ -2087,8 +2083,6 @@ static void slic_interrupt_card_up(u32 isr, struct adapter *adapter,
 			adapter->error_interrupts++;
 			if (isr & ISR_RMISS) {
 				int count;
-				int pre_count;
-				int errors;
 
 				struct slic_rcvqueue *rcvq =
 					&adapter->rcvqueue;
@@ -2097,8 +2091,6 @@ static void slic_interrupt_card_up(u32 isr, struct adapter *adapter,
 
 				if (!rcvq->errors)
 					rcv_count = rcvq->count;
-				pre_count = rcvq->count;
-				errors = rcvq->errors;
 
 				while (rcvq->count < SLIC_RCVQ_FILLTHRESH) {
 					count = slic_rcvqueue_fill(adapter);
-- 
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