Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4838686ybf; Wed, 4 Mar 2020 11:42:32 -0800 (PST) X-Google-Smtp-Source: ADFU+vtLuUzPyC2zxOHPTY+G3tiv3h4KjrBTivb9UDalBGxAg98i1ZQDqMHOR5BqXKGlLkg+76Gr X-Received: by 2002:a05:6808:3b2:: with SMTP id n18mr2820834oie.146.1583350952734; Wed, 04 Mar 2020 11:42:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583350952; cv=none; d=google.com; s=arc-20160816; b=LKARVaY9m3R0D6mAYxm3HN7wMb0FF08IeOt/OprVmRe/pRYG1UGj4KQx8xuRKs4mPO RKWNbVbGGNFwklmTXagImSc3C1u8mwSjZeG914zRUWQpyDoi9K6cpQeW+YZ87u0myDor L8WQP6HXO5SyayLXs4RF3aitS0NIsE5NHYuT8BPlydQb6By+dVX4lL3akIe5C9lsBDc9 ZjJ3ZNS3uQAqQ7r9z0OGyv3SWLDBKJLuedehKDGXJF9d62ii5JwuzVospzBb9b5M76xh ax6P+esoJjS0GOX0cr7Sh49L0UPg9ftl0iNGNVTfoK6xGK7dJtQAHrRr/EfNSrxKW6aX kA7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=6qRC4ZEtbivWf7pTzAk5IxR4VdJwhvQpCG+0bFg+YM8=; b=h4vRqaaAgfPs6JVGVlrqt6WFDbwJUtLdhtpuupomJzlSyEUVabuzYaaKwpK//sBspW D97aO6pDEUdR03m9ZC7VaIYWQ2s+b0w4Y5rJauAufWPSLgpFWowmOnq9tVHqgsLuMnGa UkZ47Ny24J1wf4z1ZTeghq+jLQsWBIdUlU0SA2AX0FHq38Zw5WqPvl+pwAC8tMGjkZet 1MQlqu+ZuKbg9Lh878IqASddYMEMak6Mx4zrpNb2B+BODG4t1mL2a3AYO4cHlgpYzJV7 f+W4dIGESKsneyERYQe2QilBJFMsOQHl5lDoFPj5d/vh+dtzbx7lv3JUHtLxxUE+sYyZ WATA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ktEiW56x; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si1806509otr.161.2020.03.04.11.42.03; Wed, 04 Mar 2020 11:42:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ktEiW56x; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728648AbgCDTmA (ORCPT + 99 others); Wed, 4 Mar 2020 14:42:00 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34739 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727835AbgCDTmA (ORCPT ); Wed, 4 Mar 2020 14:42:00 -0500 Received: by mail-wr1-f68.google.com with SMTP id z15so3985054wrl.1 for ; Wed, 04 Mar 2020 11:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=6qRC4ZEtbivWf7pTzAk5IxR4VdJwhvQpCG+0bFg+YM8=; b=ktEiW56xdeKdtuxV6JycjdIeSOuDU+DLJkql6lFehEQ6ipsd3gxfTfN13k6vkyk/oU fiTD1gkRHSacfSo2cd/Kty+URVgl5nPRgjI8+VN/P0tzw7O/UJvkxcPBhdpBkaWa+/G+ HiSXqdGoL86b2rRYjTz1MYQudJhVEcEGLHaqLKwssKSOfbF4R1M4780YsmpC8MNKVDe7 rY+XC8byCFDx7pbmI3BkcRX+oCcKzo+5NLlcRFMgJsHhweVUkcgjR3IEWSybIjH71XYQ kgT+BdHAzF/dcq7bfPNO5KfxFQ9E14uqleMZNy7rSJNqzUm8r2phryqjSQxIsFVAqb19 1OHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=6qRC4ZEtbivWf7pTzAk5IxR4VdJwhvQpCG+0bFg+YM8=; b=Pl9JRlV8k89pT15Bzq2Uoglv4CIiHmtDsVGLeZ2u79A6sxQsks7eUjZhgFOv8d4Y1/ p65mKQvDteJAY7CbIzc13lAQEhffAuJM8undW93a93bSBi0iwW+ugXSQEMP30NrCaqke e9VbMNcT7gx38LXN7JJecMEqJEc4iWShR2iT9XMGcqIaR4mQIL826k3Kv0ttVW2th4Do ZksdQv72chI95jAoc5afX9+E0IaYcEd5ZzHF7PkHHseEmmO8deXdxhXXNA90ozcfut8X PsuWlhEcH7RQ8T17JVlmo8R2smPffXSyuR6i0JGjHl4sGzERKDHgDSFgrDMsNF7ufOQG oAzg== X-Gm-Message-State: ANhLgQ3jkxvKasD9JWEwQ/CDqogddBwMd8IL4xBJdMXyqgqA0d+iOhjq nLHxIbirqrV7LPOp6crWBGOXy5UL X-Received: by 2002:adf:8b1b:: with SMTP id n27mr5670686wra.324.1583350918287; Wed, 04 Mar 2020 11:41:58 -0800 (PST) Received: from [192.168.43.18] (92.40.168.8.threembb.co.uk. [92.40.168.8]) by smtp.gmail.com with ESMTPSA id i12sm26546110wrw.64.2020.03.04.11.41.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 11:41:57 -0800 (PST) To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org From: Malcolm Priestley Subject: [PATCH 1/2] staging: vt6656: Remove vnt_interrupt_buffer in_use flag. Message-ID: <69585034-4318-4bec-7d9b-f64a167df237@gmail.com> Date: Wed, 4 Mar 2020 19:41:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org mac80211 is the only user of in_use to start it and should not be true when so. So internal toggling of this variable is not relevant. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/usbpipe.c | 28 +++------------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 5c9991415432..e94df4685b25 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -253,7 +253,6 @@ struct vnt_usb_send_context { */ struct vnt_interrupt_buffer { u8 *data_buf; - bool in_use; }; /* flags for options */ diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index b9e79755e7fa..fd2c9d9d6eb4 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -221,8 +221,6 @@ static void vnt_int_process_data(struct vnt_private *priv) low_stats->dot11ACKFailureCount += int_data->ack_fail; low_stats->dot11FCSErrorCount += int_data->fcs_err; } - - priv->int_buf.in_use = false; } static void vnt_start_interrupt_urb_complete(struct urb *urb) @@ -237,25 +235,19 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb) case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: - priv->int_buf.in_use = false; return; default: break; } - if (status) { - priv->int_buf.in_use = false; - + if (status) dev_dbg(&priv->usb->dev, "%s status = %d\n", __func__, status); - } else { + else vnt_int_process_data(priv); - } status = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC); if (status) dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status); - else - priv->int_buf.in_use = true; } int vnt_start_interrupt_urb(struct vnt_private *priv) @@ -264,13 +256,6 @@ int vnt_start_interrupt_urb(struct vnt_private *priv) dev_dbg(&priv->usb->dev, "---->Interrupt Polling Thread\n"); - if (priv->int_buf.in_use) { - ret = -EBUSY; - goto err; - } - - priv->int_buf.in_use = true; - usb_fill_int_urb(priv->interrupt_urb, priv->usb, usb_rcvintpipe(priv->usb, 1), @@ -281,16 +266,9 @@ int vnt_start_interrupt_urb(struct vnt_private *priv) priv->int_interval); ret = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC); - if (ret) { + if (ret) dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", ret); - goto err_submit; - } - - return 0; -err_submit: - priv->int_buf.in_use = false; -err: return ret; } -- 2.25.1