Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3433585ybb; Mon, 23 Mar 2020 00:36:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv7kOwoHdp1fdJzX6g8ipZzbdfXgBrNqMgCGq81qP3t4IDjJUkLHBQghE/oYPkOb7eIW6UW X-Received: by 2002:aca:be57:: with SMTP id o84mr16273282oif.138.1584948986191; Mon, 23 Mar 2020 00:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584948986; cv=none; d=google.com; s=arc-20160816; b=rLLMZtchh9b0XZRCuY0Ytlh8ZYC5mEmei8Qokxeo6etX4PXABUP7WShFl8KOfQLo+O /aX+8snuGhG16VyYjZuuR6qWG9h8if1hYReyrDJdh3GbfzsJtKOZJjYVEXszSZpeRRQd RKQ97HxHC+51SON4Ga1CIbh1T/JFphNg7p86VRXvLc8CGwsdxrSTmOTexagspoMWqLGw MCZ2dyo/NCOv0nxZlNIfoHo2JhkwPl/3625y4PY8sUMhCOIERqhlv532GTtwkBHrW8CY WmtxPLGxgfNgxG/2Hm5eJijsffkWDah+5MgDvYnpwAy99ob3dhDwhPGe4jXKJRQlLSZa 11Zg== 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=hX+vs80DDeOiro/tdn2Q9wyWfWoExexS44f4rTOFClM=; b=vp6G2oeJ9CMBD/w09m5d1cPCKC66uHSRTOxN96gyI34d/cw6K81W4pSvOLPHjK7Fj6 W3mZI8zH8YgAxchKT0kyIWCjRiul6ssuiiD0rbUOBnpYPeUItbRvC5uFR7/ylfq8jBzG Iepu+3vDWvl0zAnVjNhnA7/NhHM5mM3fQB9JYnv6vf0V5itjgya8iRsaROk6p/eVtxVw SsGuWIWmsCzmBPmvTolJgV2l/okyZLT4QGpHMIa2JIb6V68iZGTHrhb20Zv4UEEzP9j6 /dtRAal2J1QMlbDAx81n/d2KZP5sYoib2nAdlkQTFDrZsHPiOXPW1aVsQrBGkot+vm0K 4q6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=lLQzg5gd; 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 a66si6808071otc.172.2020.03.23.00.36.13; Mon, 23 Mar 2020 00:36:26 -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=lLQzg5gd; 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 S1727439AbgCWHfh (ORCPT + 99 others); Mon, 23 Mar 2020 03:35:37 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:57114 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727399AbgCWHfh (ORCPT ); Mon, 23 Mar 2020 03:35:37 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02N7TCJG196590; Mon, 23 Mar 2020 07:35:29 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=hX+vs80DDeOiro/tdn2Q9wyWfWoExexS44f4rTOFClM=; b=lLQzg5gddQjDpe/Z2V7KPmCdKmwN9wdJ2mYPY4HImmaInH66WsBxMo/5pxPgWDRYQKxe e5MQlk+1IOHlXhfXkhE6hYGSqe5fnL6qNAUf0M5+H8AcuIHKxMawH+KErCIq5Z5IaV+X wSnyj0wQQl5W1gqP0qcKf21aEr8KWtSntqZZnY8LOkjGRp9j+PeRaDw4MBJmeojcUF4y 9qFFnndHdo2kwLl0STeAkOqBPI2Hw7bjCTCrIgHRWYMSKbzazLpRdoMlZe7EaU4GyXGK hRgET7BHJptsoYhDkbGcD8+YPlWrwaY9+rf1owS+FiuiwMypIHNt3oOPXTork0waLpBc ng== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2ywabqvy8n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Mar 2020 07:35:29 +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 02N7QqSn162743; Mon, 23 Mar 2020 07:35:28 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2ywvdbjhqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Mar 2020 07:35:28 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 02N7ZRTx029793; Mon, 23 Mar 2020 07:35:27 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 23 Mar 2020 00:35:26 -0700 Date: Mon, 23 Mar 2020 10:35:18 +0300 From: Dan Carpenter To: Oscar Carter Cc: Forest Bond , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Malcolm Priestley , Mukesh Ojha , linux-kernel@vger.kernel.org, Ojaswin Mujoo Subject: Re: [PATCH] staging: vt6656: Use BIT() macro instead of hex value Message-ID: <20200323073518.GK4650@kadam> References: <20200320171056.7841-1-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200320171056.7841-1-oscar.carter@gmx.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9568 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 spamscore=0 suspectscore=0 mlxscore=0 phishscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003230044 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9568 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 priorityscore=1501 clxscore=1011 adultscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003230044 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 20, 2020 at 06:10:56PM +0100, Oscar Carter wrote: > -#define RSR_ADDRBROAD 0x80 > -#define RSR_ADDRMULTI 0x40 > +#define RSR_ADDRBROAD BIT(7) > +#define RSR_ADDRMULTI BIT(6) > #define RSR_ADDRUNI 0x00 > -#define RSR_IVLDTYP 0x20 /* invalid packet type */ > -#define RSR_IVLDLEN 0x10 /* invalid len (> 2312 byte) */ > -#define RSR_BSSIDOK 0x08 > -#define RSR_CRCOK 0x04 > -#define RSR_BCNSSIDOK 0x02 > -#define RSR_ADDROK 0x01 > +#define RSR_IVLDTYP BIT(5) /* invalid packet type */ > +#define RSR_IVLDLEN BIT(4) /* invalid len (> 2312 byte) */ > +#define RSR_BSSIDOK BIT(3) > +#define RSR_CRCOK BIT(2) > +#define RSR_BCNSSIDOK BIT(1) > +#define RSR_ADDROK BIT(0) I like these ones because I do think the new version is more clear now. > /* Bits in the EnhanceCFG_0 register */ > #define EnCFG_BBType_a 0x00 > -#define EnCFG_BBType_b 0x01 > -#define EnCFG_BBType_g 0x02 > -#define EnCFG_BBType_MASK 0x03 > -#define EnCFG_ProtectMd 0x20 > +#define EnCFG_BBType_b BIT(0) > +#define EnCFG_BBType_g BIT(1) > +#define EnCFG_BBType_MASK (BIT(0) | BIT(1)) > +#define EnCFG_ProtectMd BIT(5) Probably EnCFG_BBType_MASK should be defined using the other defines. #define EnCFG_BBType_MASK (EnCFG_BBType_b | EnCFG_BBType_g) Otherwise it looks good. Can you change that one thing and then add my Reviewed-by: Dan Carpenter regards, dan carpenter