Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp333401ybk; Wed, 13 May 2020 01:09:14 -0700 (PDT) X-Google-Smtp-Source: APiQypL1ROrMAlsmqqEYweDV7mwmff+ZOEhAesV6A4TmRNMLhNTAqHmk+3siqttZ/BjiDdm8NoxG X-Received: by 2002:a05:6402:1d1c:: with SMTP id dg28mr21069399edb.315.1589357354024; Wed, 13 May 2020 01:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589357354; cv=none; d=google.com; s=arc-20160816; b=tLERmTjXxtjhY0nGtTQVxAqq6s+ac5Zu4Uzt36Y0s8+eqyDOn3hQORADNV2slQmH// s3xru/Pm9sZ7z2ejs65TRFcpCzRaif4QU2FTusWYm25qMHJaMq6KvxFppswxGa+QnZsv L8gxD+imEa9HX2ekHV6dqhmHe2fTlsRhpH0jFElrcI6j6RyZc55n+uV9zPRdAd6eSjkh +9HrrkEX9AXzS5mUmlI50gC98WLy9Qnfq8VF271qdhx1J/F57r7XSntmZmOZKN6m21un DLPCZaVMImT1WqMzlBCnF42EOqRx0lFWsCLRwUCDMfjVGGNCC/QaQKPd/dAWvKzJrk/d GH1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Pim3IyZEqDINjfDwlBqdtARzuZVxKAN42pmXSwBLfzc=; b=Nj6RyEkR3B9zTQ1QGcI5FOPEZMoXq7PKb0dWd24v6+gmJj+3WFOrzrsr+vrXAytdvx pq8YrUM6I4r++jsdSQrccoDJGdYoAz6tfznc8uJBI2kBMJZo4VxnVmZKAasB55QJZNnW BfSpBeuP8GfjFfmnwnj2hRAEk1GF81RS8K8/mym7xR3o7pVArXn5d3xQRWRJ6gGITzW0 t1dv5eE2Mq7P9EBHYTAJ6bGS3cVdyRlzYapbLVJTkPW0vJvkvWNec1KM4QgNVquNiAXf nSySAqWd3H8VLoOPTBUL4rXE9cV+BcxjWgiBA+XGENrTTlQMr4u5+HoofAukCCa2FuPL RT9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=fqxicfpJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p6si5088978edd.50.2020.05.13.01.08.41; Wed, 13 May 2020 01:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=fqxicfpJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729438AbgEMIIO (ORCPT + 99 others); Wed, 13 May 2020 04:08:14 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:42674 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbgEMIIO (ORCPT ); Wed, 13 May 2020 04:08:14 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04D876Ma052232; Wed, 13 May 2020 08:08:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=Pim3IyZEqDINjfDwlBqdtARzuZVxKAN42pmXSwBLfzc=; b=fqxicfpJPqKPb1RSyJQloP3G7RhXuxG/kifLy0qlydEukyx8rJ4TSthyDlPvFsbnSWrf w+A9UYSpPQHiEQxF5CGlH4Y+uIGIVEEY0iaOnhWD9yXRkpYWamm5mxpzkDt8rKgptTAw V9TCLDqGVFCi6fsCmfBmUQ+PBOQAQ+aVTNNvADN0wpCD6Is9dnJxwx9IGA9FHdGMK7wb +j703FTqToS13eDX27Rj4cgG96GLAZpYnKMfAfN3ihuxzZLyvOcfBsmhSGwVFhpOSt1F RtFcwGc1D5xvNny7jusDSnEw7HiCbxICBeQUIHIsypKPpjz5DkWbC7FSL2qW6X1qOyS/ JQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 3100xwap3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 May 2020 08:08:08 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04D881FK161746; Wed, 13 May 2020 08:08:07 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 3100ye32gt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 May 2020 08:08:07 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04D884Gv003480; Wed, 13 May 2020 08:08:05 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 May 2020 01:08:04 -0700 Date: Wed, 13 May 2020 11:07:58 +0300 From: Dan Carpenter To: Malcolm Priestley Cc: Greg Kroah-Hartman , "devel@driverdev.osuosl.org" , Oscar Carter , linux-wireless@vger.kernel.org Subject: Re: [PATCH 2/6] staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_rts_duration Message-ID: <20200513080758.GB2078@kadam> References: <377a4cc3-cfe3-91aa-cf71-1063f311426a@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <377a4cc3-cfe3-91aa-cf71-1063f311426a@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9619 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005130075 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9619 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 cotscore=-2147483648 mlxscore=0 phishscore=0 adultscore=0 impostorscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005130075 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, May 05, 2020 at 10:13:54PM +0100, Malcolm Priestley wrote: > diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c > index 6724b213a723..48fe16c27d3f 100644 > --- a/drivers/staging/vt6656/rxtx.c > +++ b/drivers/staging/vt6656/rxtx.c > @@ -285,28 +285,18 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_usb_send_context *context, > u8 dur_type, u8 pkt_type, u16 rate) > { > struct vnt_private *priv = context->priv; > - u32 cts_time = 0, dur_time = 0; > + u32 dur_time = 0; > u32 frame_length = context->frame_len; > u8 need_ack = context->need_ack; > + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(context->skb); > > switch (dur_type) { > + /* fall through */ > case RTSDUR_BB: > case RTSDUR_BA: This fall through annotation shouldn't be necessary. It's not preceded by a case statement. Also you don't need /* fall through */ for empty case statements. In other words you only need it for stuff like this: case FOO: case BAR: frob(); frob(); /* fall through */ case BAZ: regards, dan carpenter