Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3199573ybb; Mon, 6 Apr 2020 04:17:18 -0700 (PDT) X-Google-Smtp-Source: APiQypIdl1/WU67SEQHugTc4cANHl7Nl/BnT8bIeBWpqKSntPzYgw0sYeH+0FZz5J+KPBm0R3vlh X-Received: by 2002:a9d:1988:: with SMTP id k8mr18135591otk.4.1586171838467; Mon, 06 Apr 2020 04:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586171838; cv=none; d=google.com; s=arc-20160816; b=dUAVGYXsIwWYPoUA4nIyO/FPKFVzIDeIeuO4Uq+cvE7VdjDUitB96qqtUxRkDZuQx7 2yZKovTgpzlgZM6iloeJq5Lm6WoqShYrVC03QRvWfPzFOe7NdVbXpvDGrixvkBu0JuXv 5fBxCnbL+4L8uK6CruzDlK438TkxK4ha2TMQhqAFQPBvX4kUTMCZ58uGtVEy7ROB7/F5 3dEwRhoVpZDkMB/l52fBshNRdRYEFBxyj9W8dnusc1DRiRwTLdnJH6CnWGGio82QbPlg 3BdlvFO1f2gZik6Ummuf3Qs6Gof9aHy7woF1K1CUUxAYvTcjR9TDJhMnSRkVdgMvCR0z c4XA== 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=ilwv4Ed7O2Ujkx8B7MXNeINOP9n9d6qmP9wV8mhqvWc=; b=1H3cMHQ6vOD96BIQtq3o0BGIDc4noqLIYIYcq1aVBrx9p3i4bmzAIVIAOCp7vCD3ec BmiSyq7N2/nrYUq29C2hGWuG3bMcgXpJ8SogLpy3vHjZBczcHGfwMd08HC92Lv0G4akP KuKlPbwh8lSMSZq+zfAbJeNFRDxzoA3Iszhz/PKX6C4wNUpeyzIZRGTtB8Hz6LFwdbVl xixLMFbek7PzOnCsGWR6E8qKkadUhZ2JNV2cIl9WEcmuu+n0+XpvG0gmOcSd69tWv3AT fZkzYNt8mQOAG8tsirggOFiQnDI8c2gt4SNnbXl/GKutvknSZXkTSz0b1/cFxlckRFT4 ZGvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=RHXDjsof; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id t5si7249654otl.193.2020.04.06.04.17.06; Mon, 06 Apr 2020 04:17:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@oracle.com header.s=corp-2020-01-29 header.b=RHXDjsof; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727300AbgDFLQl (ORCPT + 99 others); Mon, 6 Apr 2020 07:16:41 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:56386 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726873AbgDFLQk (ORCPT ); Mon, 6 Apr 2020 07:16:40 -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 036BEsm1027462; Mon, 6 Apr 2020 11:16:32 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=ilwv4Ed7O2Ujkx8B7MXNeINOP9n9d6qmP9wV8mhqvWc=; b=RHXDjsof0ah063H+WqxSHhFQ++LnlaPENIAHsRn/5jOagJC9ZRLk6kyHxScqqr9Iud0p Z2DAzrF4US94qt5TUAeO6EPJisUALt/y5Bhhd1OgG29yxMptCzJC8wNIn3RrjpGLq1ek KsgQlQGJDa17WPyUNr8mcr+WESSeSx9MkcUCRkh34nlrUHAgXK2Cr7qkmd5FYc+xwdiP WTJBRs2VCxVbkmFlCvYbE1t8NOFLP8xt6PEA6RKwcAIJqYoTBzmP7SvzTrWqkOOgVkh1 Q8m3XL+w1k64UxbCO586kPRAUgLVGH+vaeENDnXdKipfAqW1TCpWVIUL1vkB33N39W+A cQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 306j6m66d0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Apr 2020 11:16:32 +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 036BDDVn161280; Mon, 6 Apr 2020 11:16:32 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 3073qcu8s0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Apr 2020 11:16:32 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 036BGTxJ017931; Mon, 6 Apr 2020 11:16:29 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Apr 2020 04:16:29 -0700 Date: Mon, 6 Apr 2020 14:16:22 +0300 From: Dan Carpenter To: Oscar Carter Cc: Forest Bond , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Malcolm Priestley , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] staging: vt6656: Use define instead of magic number for tx_rate Message-ID: <20200406111622.GE2001@kadam> References: <20200404141400.3772-1-oscar.carter@gmx.com> <20200404141400.3772-3-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200404141400.3772-3-oscar.carter@gmx.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9582 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004060098 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9582 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004060098 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 04, 2020 at 04:13:59PM +0200, Oscar Carter wrote: > Use the define RATE_11M present in the file "device.h" instead of the > magic number 3. So the code is more clear. > > Signed-off-by: Oscar Carter > --- > drivers/staging/vt6656/baseband.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c > index 3e4bd637849a..a785f91c1566 100644 > --- a/drivers/staging/vt6656/baseband.c > +++ b/drivers/staging/vt6656/baseband.c > @@ -24,6 +24,7 @@ > > #include > #include > +#include "device.h" > #include "mac.h" > #include "baseband.h" > #include "rf.h" > @@ -141,7 +142,7 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type, > > rate = (unsigned int)vnt_frame_time[tx_rate]; > > - if (tx_rate <= 3) { > + if (tx_rate <= RATE_11M) { This is nice. And if we don't apply patch 1 then it's even nicer because then "tx_rate" is treated consistently. Reviewed-by: Dan Carpenter regards, dan carpenter