netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, dhananjay.phadke@qlogic.com
Subject: [PATCH net-2.6 2/4] netxen: fix smatch warning
Date: Fri,  8 Jan 2010 00:10:15 -0800	[thread overview]
Message-ID: <1262938217-10089-3-git-send-email-amit.salecha@qlogic.com> (raw)
In-Reply-To: <1262938217-10089-1-git-send-email-amit.salecha@qlogic.com>

o Fix pointless assignments

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/netxen/netxen_nic_hw.c   |    3 +--
 drivers/net/netxen/netxen_nic_init.c |    2 +-
 drivers/net/netxen/netxen_nic_main.c |    2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 2e364fe..398dfd4 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -345,8 +345,7 @@ netxen_pcie_sem_lock(struct netxen_adapter *adapter, int sem, u32 id_reg)
 void
 netxen_pcie_sem_unlock(struct netxen_adapter *adapter, int sem)
 {
-	int val;
-	val = NXRD32(adapter, NETXEN_PCIE_REG(PCIE_SEM_UNLOCK(sem)));
+	NXRD32(adapter, NETXEN_PCIE_REG(PCIE_SEM_UNLOCK(sem)));
 }
 
 int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port)
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 925b699..64cff68 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -784,7 +784,7 @@ netxen_need_fw_reset(struct netxen_adapter *adapter)
 	if (NXRD32(adapter, CRB_CMDPEG_STATE) == PHAN_INITIALIZE_FAILED)
 		return 1;
 
-	old_count = count = NXRD32(adapter, NETXEN_PEG_ALIVE_COUNTER);
+	old_count = NXRD32(adapter, NETXEN_PEG_ALIVE_COUNTER);
 
 	for (i = 0; i < 10; i++) {
 
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 880fcd0..9f9d608 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -340,7 +340,7 @@ netxen_check_hw_init(struct netxen_adapter *adapter, int first_boot)
 		if (!(first_boot & 0x4)) {
 			first_boot |= 0x4;
 			NXWR32(adapter, NETXEN_PCIE_REG(0x4), first_boot);
-			first_boot = NXRD32(adapter, NETXEN_PCIE_REG(0x4));
+			NXRD32(adapter, NETXEN_PCIE_REG(0x4));
 		}
 
 		/* This is the first boot after power up */
-- 
1.6.0.2


  parent reply	other threads:[~2010-01-08  8:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08  8:10 [PATCH net-2.6 0/4]netxen: fix memory leak Amit Kumar Salecha
2010-01-08  8:10 ` [PATCH net-2.6 1/4] netxen: fix tx ring " Amit Kumar Salecha
2010-01-08  8:10 ` Amit Kumar Salecha [this message]
2010-01-08  8:10 ` [PATCH net-2.6 3/4] netxen: fix set mac addr Amit Kumar Salecha
2010-01-08  8:10 ` [PATCH net-2.6 4/4] netxen: update version to 4.0.72 Amit Kumar Salecha
2010-01-08  8:40 ` [PATCH net-2.6 0/4]netxen: fix memory leak David Miller

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=1262938217-10089-3-git-send-email-amit.salecha@qlogic.com \
    --to=amit.salecha@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=dhananjay.phadke@qlogic.com \
    --cc=netdev@vger.kernel.org \
    /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).