Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2106059pja; Thu, 26 Mar 2020 09:46:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu+J2CsdnDZWs2LhtcFWFiPDb6WWkbRg1s8mh/jfbNU2Y18s5Y+8mf/z1mar/+qiC2WAIFT X-Received: by 2002:aca:fcd8:: with SMTP id a207mr838247oii.56.1585241204074; Thu, 26 Mar 2020 09:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585241204; cv=none; d=google.com; s=arc-20160816; b=Q//LL6r/HaamuR+Kt+rudOeM0JzA1zv6VKUIcOBQgC26kf8kscGffAUJTpJLA5uUTA SB9KO+43yHB9pi4IlckL31HyjDuk5bdbWq/hdoDupAhoyy4fnfHe2mk/U2lCYwSgZET4 SItDnCwzA9BgM5sgtHL1d8xsSxeykOEE0hiUXuYYljWn98NDpGYK+u+aOn8tOqcOoGrk CK004+ougcT9GteEgFZoLCDplF4tv9f0WLC3Htahh9YOvwDcKTiiFgGUyLeeMiR0jkCs EvdKJSOLZY54k8/ajg4y+WQkYY07Xjd7B2AN1wY+DEzujTEk3rh5Ed92vRGy1O/K0vua DNJA== 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:user-agent :in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature; bh=HSAwvu1nGAbF9wyDmHCkO8LunZr8SVxsGeJbVzNsuyE=; b=qUMb9Bp8C+qnFymFIPVhU6zD2uwkPPMoYIXFUVHp5GJDib93krlw4ll5Z/d4HlQKMO BNxxNeAPt4AFKU1HxXnxS5kxWKmVjvkEAXma84NfMoFPvm8vUOkCxFN3ERYkJHqyA6Jy zn8PyhP/2f0F5LjgPwQkBozVtpvtzpyUhCWRA55SP6atdbCwcRgi3SvCvoxZy2UIZaSW v2O/j+XAP27vftXGzqmciVc7CFJp9rVyHFnuReolt+fzClD2QMONYoHDr1CA2D8RTzIa 8say5W6wiHhz5Fw/MQZ+VI5p2Xl/akD6k2vA1oCc7nZA2yVzg76hCBIvoRwiZP4UNZ3z 5w/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=blxVZnnm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si1211444ooq.37.2020.03.26.09.46.28; Thu, 26 Mar 2020 09:46:44 -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=@gmx.net header.s=badeba3b8450 header.b=blxVZnnm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727803AbgCZQoF (ORCPT + 99 others); Thu, 26 Mar 2020 12:44:05 -0400 Received: from mout.gmx.net ([212.227.17.22]:55117 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbgCZQoE (ORCPT ); Thu, 26 Mar 2020 12:44:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1585241001; bh=UVbrUb+k2mZ8gQQp531jOp6OyS4N5ogYYHX6KJL1YCU=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=blxVZnnmMDa/b8P3caKBpshrtPnRziu3jzDhlTkuXpnrj+kNY0/4RZzksYDbh7hnw fLII8RoVZM59hxxC7Aj7CGOJQjjSYqWOqBatgQZzUauZKcb5LVFJH3ZIsIPtRRWNqP PBfb3GxDKCKxu36ivhmfFT6LVVOW/g3jq67uacfI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ubuntu ([83.52.229.196]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N1wpt-1jOCXY1wrp-012Jls; Thu, 26 Mar 2020 17:43:21 +0100 Date: Thu, 26 Mar 2020 17:43:05 +0100 From: Oscar Carter To: Dan Carpenter Cc: Oscar Carter , 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: <20200326164304.GA3629@ubuntu> References: <20200320171056.7841-1-oscar.carter@gmx.com> <20200323073518.GK4650@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200323073518.GK4650@kadam> User-Agent: Mutt/1.10.1 (2018-07-13) X-Provags-ID: V03:K1:ISIX9ycQftVxIKBz3LnMcYJeXp51Z1jCaxo7XqwvIjHSJSTg4nM JHlz+vlVy60PwwLMtbHqQ73yjNPQcFb0B6WkzOj35hsEKcFQ/TGpipUFZFZI4kcjBBgamOm W6yGr/ypA+RtBgjIHDOsjMXSIy4D/Ldb9ZY6wYMLUdbkpbnNbtgs+YRD5ZaxiU4KIcftjfo zlA5IuYuFS7vx2G/IOXeQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:EXGQy6V7unU=:tkPDTF0Nvd+ujPunjlx3+r ONWMxR290GHbd7nj23A7c0sE5BxHQ2u0WEpXVey+UeIvPpfUVX671q+MFYlQB+Xh/VlJIOTMA GFI8OoPh1l4jL2+AqaOI3REcvrpKcGMNgRmNjGT9AkzDKEYabzMZIyqBmpMFtPEZZnL3wbJJ1 uYIItOH8DcyUNX1rrOCO1soO5V8tUNJVtgfrXtUrIwt7PKkyuooaKcV7T93sM5XWB+4QGTJPA km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ux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 23, 2020 at 10:35:18AM +0300, Dan Carpenter wrote: > 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 > Ok, i will make this change and i will send and incremental patch with the "Fixes:" tag due to the this patch has already been added to the staging-n= ext branch of the greg staging tree. > regards, > dan carpenter > thanks, oscar carter