[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1422484998-10400-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Wed, 28 Jan 2015 23:43:18 +0100
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Marek Belisko <marek.belisko@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
Joe Perches <joe@...ches.com>, Greg Donald <gdonald@...il.com>,
Aybuke Ozdemir <aybuke.147@...il.com>,
Nicky Chorley <ndchorley@...il.com>,
Jiayi Ye <yejiayily@...il.com>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: ft1000: ft1000-pcmcia: ft1000_hw: Removed variables that is never used
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@...ctrumdigital.se>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index d5475b7..3c42737 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -1230,7 +1230,6 @@ static int ft1000_parse_dpram_msg(struct net_device *dev)
struct ft1000_info *info = netdev_priv(dev);
u16 doorbell;
u16 portid;
- u16 nxtph;
u16 total_len;
int i = 0;
unsigned long flags;
@@ -1282,7 +1281,6 @@ static int ft1000_parse_dpram_msg(struct net_device *dev)
if (doorbell & FT1000_DB_DPRAM_RX) {
pr_debug("Got a slow queue message\n");
- nxtph = FT1000_DPRAM_RX_BASE + 2;
if (info->AsicID == ELECTRABUZZ_ID) {
total_len =
ft1000_read_dpram(dev, FT1000_DPRAM_RX_BASE);
@@ -1294,7 +1292,6 @@ static int ft1000_parse_dpram_msg(struct net_device *dev)
}
pr_debug("total length = %d\n", total_len);
if ((total_len < MAX_CMD_SQSIZE) && (total_len > sizeof(struct pseudo_hdr))) {
- total_len += nxtph;
/*
* ft1000_read_reg will return a value that needs to be byteswap
* in order to get DSP_QID_OFFSET.
@@ -1382,7 +1379,6 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum)
struct ft1000_info *info = netdev_priv(dev);
struct ft1000_pcmcia *pcmcia = info->priv;
u16 i;
- u32 templong;
u16 tempword;
if (pcmcia->PktIntfErr > MAX_PH_ERR) {
@@ -1422,8 +1418,7 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum)
tempword =
ft1000_read_reg(dev, FT1000_REG_DFIFO_STAT);
} else {
- templong =
- inl(dev->base_addr + FT1000_REG_MAG_DFR);
+ inl(dev->base_addr + FT1000_REG_MAG_DFR);
tempword =
inw(dev->base_addr + FT1000_REG_MAG_DFSR);
}
@@ -1502,7 +1497,7 @@ static void ft1000_flush_fifo(struct net_device *dev, u16 DrvErrNum)
} else {
pr_debug("Flushing FIFO complete = %x\n", tempword);
/* Flush last word in FIFO */
- templong = inl(dev->base_addr + FT1000_REG_MAG_DFR);
+ inl(dev->base_addr + FT1000_REG_MAG_DFR);
tempword = inw(dev->base_addr + FT1000_REG_SUP_STAT);
pr_debug("FT1000_REG_SUP_STAT = 0x%x\n", tempword);
tempword = inw(dev->base_addr + FT1000_REG_MAG_DFSR);
--
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