From d5ae3c482df04a74e03ed944f33209178adaf03f Mon Sep 17 00:00:00 2001
From: Kelley Nielsen <kelleynnn@gmail.com>
Date: Tue, 5 Nov 2013 21:36:55 -0800
Subject: [PATCH] staging: ft1000: remove unused variable nxtph

The function ft1000_poll, in ft1000_hw.c, is overly complex, with at
least five different levels of nesting. While preparing to extract one
of the cases to its own function, I discovered that the variable nxtph
is not used. It is declared and assigned a value in ft1000_poll(), then
passed by reference to the helper function ft1000_receive_command(),
which receives it as parameter. pnxtph does not appear in the body of
this function. Remove all occurrences of nxtph and pnxtph.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 84bdc6c647cb..e9ef27f8e19d 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -972,10 +972,9 @@ static int ft1000_chkcard(struct ft1000_usb *dev)
 *  Input:
 *    dev - network device structure
 *    pbuffer - caller supply address to buffer
-*    pnxtph - pointer to next pseudo header
 */
 static bool ft1000_receive_cmd(struct ft1000_usb *dev, u16 *pbuffer,
-			       int maxsz, u16 *pnxtph)
+			       int maxsz)
 {
 	u16 size;
 	int ret;
@@ -1445,7 +1444,6 @@ int ft1000_poll(void* dev_id)
     u16 data;
     u16 modulo;
     u16 portid;
-    u16 nxtph;
 	struct dpram_blk *pdpram_blk;
 	struct pseudo_hdr *ppseudo_hdr;
     unsigned long flags;
@@ -1489,10 +1487,9 @@ int ft1000_poll(void* dev_id)
         	           if ( (dev->app_info[i].DspBCMsgFlag) && (dev->app_info[i].fileobject) &&
                                          (dev->app_info[i].NumOfMsg < MAX_MSG_LIMIT)  )
 			   {
-			       nxtph = FT1000_DPRAM_RX_BASE + 2;
 			       pdpram_blk = ft1000_get_buffer (&freercvpool);
 			       if (pdpram_blk != NULL) {
-			           if ( ft1000_receive_cmd(dev, pdpram_blk->pbuffer, MAX_CMD_SQSIZE, &nxtph) ) {
+			           if ( ft1000_receive_cmd(dev, pdpram_blk->pbuffer, MAX_CMD_SQSIZE) ) {
 					ppseudo_hdr = (struct pseudo_hdr *)pdpram_blk->pbuffer;
 				       // Put message into the appropriate application block
 				       dev->app_info[i].nRxMsg++;
@@ -1520,7 +1517,7 @@ int ft1000_poll(void* dev_id)
                         pdpram_blk = ft1000_get_buffer (&freercvpool);
 
                         if (pdpram_blk != NULL) {
-                           if ( ft1000_receive_cmd(dev, pdpram_blk->pbuffer, MAX_CMD_SQSIZE, &nxtph) ) {
+                           if ( ft1000_receive_cmd(dev, pdpram_blk->pbuffer, MAX_CMD_SQSIZE) ) {
 				ppseudo_hdr = (struct pseudo_hdr *)pdpram_blk->pbuffer;
                                // Search for correct application block
                                for (i=0; i<MAX_NUM_APP; i++) {
-- 
2.34.1