From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67E78C2D0F9 for ; Wed, 13 May 2020 08:08:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48E81206F5 for ; Wed, 13 May 2020 08:08:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="fqxicfpJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729438AbgEMIIO (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96567CA90AF for ; Wed, 13 May 2020 08:08:13 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60BD7206F5 for ; Wed, 13 May 2020 08:08:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="fqxicfpJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60BD7206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3691B88498; Wed, 13 May 2020 08:08:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id psWBnK+aiQYx; Wed, 13 May 2020 08:08:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 74F3988478; Wed, 13 May 2020 08:08:12 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 233231BF589 for ; Wed, 13 May 2020 08:08:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 160EF2010D for ; Wed, 13 May 2020 08:08:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fQwaLsYBK8rZ for ; Wed, 13 May 2020 08:08:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by silver.osuosl.org (Postfix) with ESMTPS id 1A63F20C92 for ; Wed, 13 May 2020 08:08:09 +0000 (UTC) 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 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-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 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "devel@driverdev.osuosl.org" , Greg Kroah-Hartman , Oscar Carter , linux-wireless@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" 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 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel