[PATCH] staging: ft1000: ft1000-usb: ft1000_debug: Removed variables that is never used

From: Rickard Strandqvist
Date: Wed Jan 28 2015 - 20:13:50 EST


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@xxxxxxxxxxxxxxxxxx>
---
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index c8d2782..c43bfdf 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -297,14 +297,13 @@ void ft1000_destroy_dev(struct net_device *netdev)
*/
static int ft1000_open(struct inode *inode, struct file *file)
{
- struct ft1000_info *info;
struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private;
int i, num;

num = (MINOR(inode->i_rdev) & 0xf);
pr_debug("minor number=%d\n", num);

- info = file->private_data = netdev_priv(dev->net);
+ file->private_data = netdev_priv(dev->net);

pr_debug("f_owner = %p number of application = %d\n",
&file->f_owner, dev->appcnt);
@@ -531,7 +530,6 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
u16 *pmsg;
u16 total_len;
u16 app_index;
- u16 status;

/* pr_debug("IOCTL_FT1000_SET_DPRAM called\n");*/

@@ -594,22 +592,22 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
} else {
/* Put message into Slow Queue */
/* Only put a message into the DPRAM if msg doorbell is available */
- status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
+ ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
/* pr_debug("READ REGISTER tempword=%x\n", tempword); */
if (tempword & FT1000_DB_DPRAM_TX) {
/* Suspend for 2ms and try again due to DSP doorbell busy */
mdelay(2);
- status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
+ ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
if (tempword & FT1000_DB_DPRAM_TX) {
/* Suspend for 1ms and try again due to DSP doorbell busy */
mdelay(1);
- status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
+ ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
if (tempword & FT1000_DB_DPRAM_TX) {
- status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
+ ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
if (tempword & FT1000_DB_DPRAM_TX) {
/* Suspend for 3ms and try again due to DSP doorbell busy */
mdelay(3);
- status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
+ ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
if (tempword & FT1000_DB_DPRAM_TX) {
pr_debug("Doorbell not available\n");
result = -ENOTTY;
--
1.7.10.4

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