staging: vt6656: struct vnt_rcb remove unused in_use.
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 4 Mar 2020 19:46:02 +0000 (19:46 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Mar 2020 09:51:20 +0000 (10:51 +0100)
The variable merely toggles true to false and is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/130a4078-2502-a381-46c4-b473815e153b@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/device.h
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/usbpipe.c

index e94df4685b255dd18c0e3b0a7b9eb645266909f6..98793e15e80f073a2233e6a4a606682a6b9cef5c 100644 (file)
@@ -227,7 +227,6 @@ struct vnt_rcb {
        void *priv;
        struct urb *urb;
        struct sk_buff *skb;
-       int in_use;
 };
 
 /* used to track bulk out irps */
index 41edadc74389d79ef02f1d7e1ebf16ece1ada601..56f81785a11887cc9e9ffafafd987326b14a3c96 100644 (file)
@@ -478,9 +478,6 @@ static int vnt_alloc_bufs(struct vnt_private *priv)
                        ret = -ENOMEM;
                        goto free_rx_tx;
                }
-
-               rcb->in_use = false;
-
                /* submit rx urb */
                ret = vnt_submit_rx_urb(priv, rcb);
                if (ret)
index fd2c9d9d6eb41b37307655f4580ca7d92732a003..eae211e5860f1e16e673224c5f557cca912750c3 100644 (file)
@@ -393,10 +393,8 @@ static void vnt_submit_rx_urb_complete(struct urb *urb)
        if (urb->actual_length) {
                if (vnt_rx_data(priv, rcb, urb->actual_length)) {
                        rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
-                       if (!rcb->skb) {
-                               rcb->in_use = false;
+                       if (!rcb->skb)
                                return;
-                       }
                } else {
                        skb_push(rcb->skb, skb_headroom(rcb->skb));
                        skb_trim(rcb->skb, 0);
@@ -406,11 +404,8 @@ static void vnt_submit_rx_urb_complete(struct urb *urb)
                                               skb_tailroom(rcb->skb));
        }
 
-       if (usb_submit_urb(urb, GFP_ATOMIC)) {
+       if (usb_submit_urb(urb, GFP_ATOMIC))
                dev_dbg(&priv->usb->dev, "Failed to re submit rx skb\n");
-
-               rcb->in_use = false;
-       }
 }
 
 int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
@@ -433,13 +428,8 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb)
                          rcb);
 
        ret = usb_submit_urb(urb, GFP_ATOMIC);
-       if (ret) {
+       if (ret)
                dev_dbg(&priv->usb->dev, "Submit Rx URB failed %d\n", ret);
-               goto end;
-       }
-
-       rcb->in_use = true;
-
 end:
        return ret;
 }