Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4841775ybf; Wed, 4 Mar 2020 11:46:35 -0800 (PST) X-Google-Smtp-Source: ADFU+vutCpy3qwoN1j9VqWaCotNTOMAw213k/H+DsJsQRPu1DnuPpfWbAuVrJDUwlTdp7PVObMES X-Received: by 2002:a05:6808:6cd:: with SMTP id m13mr2871840oih.53.1583351195819; Wed, 04 Mar 2020 11:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583351195; cv=none; d=google.com; s=arc-20160816; b=rphgkcJB4ZiG2CHvpswBix1/J6erUL1EGJSU/I6K59Iy+PIjywUc/gxFs8xf9yRxpL li8/P5UJjHpx25vzxLtT97dR987/j1FQkRHU3pc6PxzFGEsR6zHUdHxi9mc8f4mJDPGH uR4iJju/q3j2hQjDkLXxwSkBtDUGo/NIScrxuYbOiVAj9OSqC0VGqZn4Lzzlb8dx5SmV ri8f8qQSSMJTXoLbXBUK2whg9feXwPgOHG+/5f9yqIYjhKiqjFb6pn2TTy5OScXfFKHG vJshFdLsDYNKB3gt30pw3FU+0ys18Is2hv925Zzom5GEmB8zSstF8mUokJnEAB9ydpO9 d4ew== 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=yQqOnaNgqo9/pU61x9cE5W84q/MMvrOFd9j49w+kVT8=; b=fRs60gl3b9xRtki0Q4p7e7vPkkzJn4cEco39SzlLsCSYlqMdy79AiEnJjaH5LbCzIK JyJj5WAr48U7XZrsXYesoEXh23dNsYdrEH5EI+HBnGFmMuSRgipoQ4QfD0BUS+lmkyMs FBPah6b+hrxzCLyiLcsyqpbsdL3kYmz1QVeSxxKEiutJTIjTkrEEVmSE2fPfiqDyGPCY KKLudr5pajKZNk/VOSuyH3hUzsT1OQDypN77FIpWxJW7VJAAM2KcAKdeCcjMpHlrMtB4 83DkXx+ZSBGFdLU/qzmwelJf70N7TxHasATvyEaI928Wp2mKn8Vyz9vdj7xcDB/g3Bgc J1mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oQkubaaC; 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 z10si1773163oth.325.2020.03.04.11.46.24; Wed, 04 Mar 2020 11:46:35 -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=oQkubaaC; 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 S2387869AbgCDTqG (ORCPT + 99 others); Wed, 4 Mar 2020 14:46:06 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38315 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387861AbgCDTqG (ORCPT ); Wed, 4 Mar 2020 14:46:06 -0500 Received: by mail-wr1-f68.google.com with SMTP id t11so3973386wrw.5 for ; Wed, 04 Mar 2020 11:46:05 -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=yQqOnaNgqo9/pU61x9cE5W84q/MMvrOFd9j49w+kVT8=; b=oQkubaaCUXECeIMHdsEZ5kDdHWZI1vfkAkbD/bGVQTtzD0hECYz3g1mfG7NgAVOwA+ RM7FzQUhX0MrzpDR6AyAnF99AyvbX0QA9m4gTgrc3+kzwdvb7waG7C5AmWdo5dABvW9E swObt4kml8Buz8sldjwIIb9unhu17/SFqTxoMjGwhXsByqinrrnfQE/IR4GHWADmSR/9 YyqBoCYiVplGBt4mMRK2z1WfynEk1ynh+DTNgL0ynzP2p0rp21ZGzfMCLezpfaKfKRAG ECmOxv7ZcigrF4h+JN6eJGKpVRhNhgVcLMB95zkNeXEbmYDB/Hfl5HFQGLUa2r9btTUI d7Qg== 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=yQqOnaNgqo9/pU61x9cE5W84q/MMvrOFd9j49w+kVT8=; b=ZyZROnu0CAgkUm4USnWu4AEhmP7E9BnEO1Y/GSYh+xofof6he3lOs2VAV4txSqOV3X 8uxrcBUrOEJ8ySTGfk+ED09kjeBCjpUNx+ls9kwCi8UO8KcSnt59FHslP1+CeT0J8E+P /Qb780F8HXPzdvxyE7G2PQj6yzNA88PXRkXloeKVTf3EiEeLRehWe6Ds5YYQE81aCNw5 rCdF1Ltojyx0P0ZJdpHWVe8mg34h48Vkfo/IDMhA23uy2YeTCEF2EXo1WB15PYfdmsob 5Fc8v8a1Zt5n+fsKkpP4s/hVhnL2K8t3EEanXTwklQfW3tBYlY6Zf6bTYF9Rfxejipbi Lo+Q== X-Gm-Message-State: ANhLgQ1H/MznOav0hHqJxj5roRdXfNkYrc3dx4vQATxo8FhQJQLf2gF3 kx0GWvFSR+2o5IzNas+XCOrh0cBS X-Received: by 2002:a5d:4e8b:: with SMTP id e11mr2502804wru.136.1583351164403; Wed, 04 Mar 2020 11:46:04 -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 a7sm5327252wmj.12.2020.03.04.11.46.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 11:46:04 -0800 (PST) To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org From: Malcolm Priestley Subject: [PATCH 2/2] staging: vt6656: struct vnt_rcb remove unused in_use. Message-ID: <130a4078-2502-a381-46c4-b473815e153b@gmail.com> Date: Wed, 4 Mar 2020 19:46:02 +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 The variable merely toggles true to false and is unused. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/device.h | 1 - drivers/staging/vt6656/main_usb.c | 3 --- drivers/staging/vt6656/usbpipe.c | 16 +++------------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index e94df4685b25..98793e15e80f 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -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 */ diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 41edadc74389..56f81785a118 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -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) diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index fd2c9d9d6eb4..eae211e5860f 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -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; } -- 2.25.1