Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2133777pja; Thu, 26 Mar 2020 10:11:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt0C9xxeEtq6hKVZGcRlO8ix5dly92nrKV3M+bSFzD662kqLhCYjKxUZHXMWwW1SICs6Adb X-Received: by 2002:a05:6830:231b:: with SMTP id u27mr7429185ote.111.1585242711455; Thu, 26 Mar 2020 10:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585242711; cv=none; d=google.com; s=arc-20160816; b=pearB5jLcPgtRoDi0sWYTQsdVfpELh2+KdfU3FJaQ+9tqDULDRYRBm+zBTxuC3MVDr 1hv7ZqP+H4y9t5TlBDoAVFbWjQ5J/XS0SxAJOs+IVEWkgfWsw5g6kVy1I/NAytQ1rCz8 8/yp8yr9PGs0BpvBM1xkvYvh1AI8K40vq8VFMb4ZJvSrlkTnBS9wZsBXYdv8ZVOyBGVd rYywtCmASnWvy++VoHgcfJVEk+DDBItVCJ/G95+AVOeTV4r/2+bz2nU+1IrfdzpeU8aq /HtG1gv9Prjd2DY2nWF8sdETth31uBt4v+S+vjpW2mqHBnZkd03p5HkhOF81CkJ5hAoY DVOg== 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=o1D7o/ur3MUWUoGKn4pscGmJT1GM6cuqt1Dsfn7u9rU=; b=xiUuH2tvQ4WmWUmKPzqmm+oGpL2buUnHMI7stbiwsoFbr+Gw3dwV+n9f3lHZUhBuTO gvxCq0r1FkOaeJt2SJ71DkA5/3VDOIuzFioLfN9rkKObMq83KKLZ5xfYxCMoEFS9kKOG 3DJ8dN4KinRSG7rowLCO4PaoDZnQA5z2GA3mU+jfL2bFh/tSKNTUSjjcQJeoAsGACxSq 1JTvJTaTXWcMKxqsRI7rjHxBpzr56BmaYODBF0vVFlhlw8SU2DZuiOBHz1Yqjf7UGiu7 UOPL4t6mc+V0ukBcWc3iUuZzknfHwh9i73I7XnN65R1j34YRJpk3xBlSdRR/dHuKIkiI plsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=KwxTTmSK; 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 y206si1177926oig.253.2020.03.26.10.11.35; Thu, 26 Mar 2020 10:11:51 -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=KwxTTmSK; 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 S1727502AbgCZRKy (ORCPT + 99 others); Thu, 26 Mar 2020 13:10:54 -0400 Received: from mout.gmx.net ([212.227.15.18]:60761 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbgCZRKx (ORCPT ); Thu, 26 Mar 2020 13:10:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1585242645; bh=hvqInh9aY84kozIuxBpF3a7NAoi9KTncxIFpjJt9bBo=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=KwxTTmSKCLthuf2GfZr5/jtUsyQ4kYDtguvgWdNYdUA/phY32xtMTnbS91sGex4ew BQeKIG+4lhMjIObVUzVevw6Rgu/8EtMrDmJheMovb3NI/JxDnnW+aEc+BRgfLqObSS 8EKqrkKqr4swymIbZ8GM/80srpWVfPClL0CVjwU4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ubuntu ([83.52.229.196]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MkHMZ-1jfpMq2kjR-00kfcV; Thu, 26 Mar 2020 18:10:45 +0100 Date: Thu, 26 Mar 2020 18:10:43 +0100 From: Oscar Carter To: Dan Carpenter Cc: Oscar Carter , Forest Bond , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Malcolm Priestley , linux-kernel@vger.kernel.org, Gabriela Bittencourt , Colin Ian King Subject: Re: [PATCH] staging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* functions Message-ID: <20200326171043.GB3629@ubuntu> References: <20200320181326.12156-1-oscar.carter@gmx.com> <20200323073214.GJ4650@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200323073214.GJ4650@kadam> User-Agent: Mutt/1.10.1 (2018-07-13) X-Provags-ID: V03:K1:O4+keqWShH3MXaNp9FG4v4kYmJ4mELgnL0HyqbFWwfZtObOpAfE UyCDl2MuflZMd0WG6YPyRFLzX6iI3CQNPCGnOR0MHQrvxAS4SL58V2bposf8Tlonl3ivmkB dFQFLjfVzoGZrHtkMqwyqO+YugPZ8WsKhBQA3ShWpY8Cv0wCQJ1J1NYVkwwR8NIHJ6xs5U+ XMpjBf+sT6X+UyxEioc/A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sH6Qqv5PV5A=:4VzFhpqAvOF3jlTjlng9rs TEKvaPTISxxY3Pr7WjmYQ6hc62VJ75dq7JVx6SnkAFvptRXP19+70AmHko30FT8VBDcmZMe1D DLA19OSzDKgEq6Zzi0iFPacTI/IqaaDE5C6Ya++C6V5xiCwqQBOaTa8Bq78FZsKwTxkp9ABtm 90RKw4SC7FoWoqsXM102ci4fgRi7+0X7xZA38cuCU1ToBxi8knJ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wH0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 23, 2020 at 10:32:14AM +0300, Dan Carpenter wrote: > On Fri, Mar 20, 2020 at 07:13:26PM +0100, Oscar Carter wrote: > > +#include > > #include "mac.h" > > #include "baseband.h" > > #include "rf.h" > > @@ -468,7 +469,7 @@ int vnt_vt3184_init(struct vnt_private *priv) > > if (ret) > > goto end; > > > > - ret =3D vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01); > > + ret =3D vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, BIT(0)); > > Everyone knows 0x01 is bit(0) already. This isn't more clear. It > should be a define instead of a magic number. > I agree. I create a new define for this case. > > @@ -63,7 +64,8 @@ void vnt_set_channel(struct vnt_private *priv, u32 c= onnection_channel) > > vnt_mac_reg_bits_on(priv, MAC_REG_MACCR, MACCR_CLRNAV); > > > > /* Set Channel[7] =3D 0 to tell H/W channel is changing now. */ > > - vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, 0xb0); > > + vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, > > + (BIT(7) | BIT(5) | BIT(4))); > > This one especially is just a lot longer now but still not clear. > Like the previous one, i create a define. In this case to avoid the magic number or the OR operation between BIT macros. > regards, > dan carpenter > I will make these changes 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. thanks, oscar carter