Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp857658pja; Wed, 1 Apr 2020 09:57:01 -0700 (PDT) X-Google-Smtp-Source: APiQypKTYFr/gnn4gGdwzx0qM9TRt99G2RKIFUGgVPYVrsMnJURTKhfoYRyx2mgfJCtsDdDIwZCK X-Received: by 2002:a05:6808:a0a:: with SMTP id n10mr3595959oij.10.1585760221099; Wed, 01 Apr 2020 09:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585760221; cv=none; d=google.com; s=arc-20160816; b=BB6aty31zwipC1tjznSunE+IISuA0VO3s7EBp6Evxj6oHbor/Pg2Wr2Erxt2tS6K69 M4PLxJ6DIhk3DgUXWfB7Sykm4jVqPh5A0hZXtdDkkgrzPJexv5iKcjT+aphQIePopM6p DDcXE7Hu/EUqnguoyK+rfAgHtPiG4A2FQ2kDdPeU4UFYK+FIvZA3w/lV5/henNfqJmGL TyclZn8e+kJMvSUP9M6dqQxbDw/878P9X6XresSIZ64HcU65lUw5j4zxNQ7L2ElpWV3p +ua4YLo9NFeU6IoRqgIjZiCVskT7ULVqOF3yIbvQUWxNFCnONH8Okp8slfNR8V0XerfB lzqg== 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=N2TjRn7VE3J72KHc3wBlu/blkYGDVpqNJNo9Mcamtek=; b=EKQwg74Px2hdBYcq9cXDkjBV5/VQ6H5tSWvbHYTSZdkXP5UmQ06OqQJrWdhZcje8S/ 7mIqYEVnzYw4YB8k+bX65bVmfoHdAXNPNnCrRsH+4n+JwvG2kq9kMkfTBZM+XyVeuqGP HMOWhd99NcIUNfyjiuT7dOCv48w7Rqn8fGYce9P2rBaTfo+zb+Hk46kEKBQHHIAvekwX Ql3r1bumLhJi9uG0yNhKDbvCeiQKAJN3J/tn7bIdVg1OlAmgy7eD2bQNx+cnJGSpYF9R kJnfps7GX4rB0CHkkeJo2yE3FE1mBi4boEmKWa/caYFZ6K9jKBjkFvNjGWFJyFIRZIsV XaXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=XQI6xGSN; 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 f33si358996otf.64.2020.04.01.09.56.48; Wed, 01 Apr 2020 09:57:01 -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=XQI6xGSN; 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 S1732799AbgDAQzy (ORCPT + 99 others); Wed, 1 Apr 2020 12:55:54 -0400 Received: from mout.gmx.net ([212.227.15.19]:37843 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732246AbgDAQzw (ORCPT ); Wed, 1 Apr 2020 12:55:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1585760141; bh=jufOl9LToMfDMpVOPWx78HZPLIFoXwerAO2+O83FXV4=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=XQI6xGSNwQQ+Vb7W2guxnfhA09G4esx/7qIH0ovYyGso7e7lG9NfoBhDAoKAZ0y8Q eEvzdQlUtiLuQHCKXgKqHGHJyDnw/NSkMsHpeQ3ikHJNHqNSprwne8z1B9cEus5C7l YjFGLEtSkwUwoXkgS0EKHJ4HUVAFcwHZ6x3KNruc= 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 1M6lpM-1jPkva3J3m-008Gl9; Wed, 01 Apr 2020 18:55:40 +0200 Date: Wed, 1 Apr 2020 18:55:38 +0200 From: Oscar Carter To: Dan Carpenter Cc: Oscar Carter , Forest Bond , Greg Kroah-Hartman , Malcolm Priestley , Quentin Deslandes , Amir Mahdi Ghorbanian , Colin Ian King , Gabriela Bittencourt , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: vt6656: Use defines in vnt_mac_reg_bits_* functions Message-ID: <20200401165537.GC3109@ubuntu> References: <20200328095433.7879-1-oscar.carter@gmx.com> <20200331102906.GA2066@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331102906.GA2066@kadam> User-Agent: Mutt/1.10.1 (2018-07-13) X-Provags-ID: V03:K1:+gPfFoS721r+mvPOMeEJLs+3wcGSjyf6c/ZvFKIvawJoJwQJjOB laYts9bS+jFq9IaO1hPlLoO8I1IpU79ypPH5pQNr7SrMdSIiNxkmuVcP/7lNyxQoxYuGqii WYTWbPvSqFgARZEuCY6XXJub6t6xpSnkIRh+ZWFYgNZKlDfj3NLI3IqEHXRXxz2gsHh+IPU RmK9g9WJlKuUJEJi0qDiQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:TThDrtfsJsQ=:2H6KhCTRNDVxktbJMpTT43 lvHtTWfY88j2YOMRksIFIAYrFOTSfqr6BpAhC0Y5TNlDh5snnZkyOcER1C0C2Wvk+KJsB+7lt /z3i6Po6kdOQMpw2oGjOsE9mAYBITN4iBuLvne+kk7DTfQbcVQR/40p/1e2qZnBtJv4S9ULyR WvnD7dC6AlriMEYRBkEgzCws/vDCwHbsE9CJw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qCzF4TcvwK 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 Tue, Mar 31, 2020 at 01:29:06PM +0300, Dan Carpenter wrote: > On Sat, Mar 28, 2020 at 10:54:33AM +0100, Oscar Carter wrote: > > Define the necessary bits in the CHANNEL, PAPEDELAY and GPIOCTL0 > > registers to can use them in the calls to vnt_mac_reg_bits_on and > > vnt_mac_reg_bits_off functions. In this way, avoid the use of BIT() > > macros and clarify the code. > > > > Fixes: 3017e587e368 ("staging: vt6656: Use BIT() macro in vnt_mac_reg_= bits_* functions") > > Suggested-by: Dan Carpenter > > Signed-off-by: Oscar Carter > > --- > > drivers/staging/vt6656/baseband.c | 6 ++++-- > > drivers/staging/vt6656/card.c | 3 +-- > > drivers/staging/vt6656/mac.h | 12 ++++++++++++ > > drivers/staging/vt6656/main_usb.c | 2 +- > > 4 files changed, 18 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt665= 6/baseband.c > > index a19a563d8bcc..dd3c3bf5e8b5 100644 > > --- a/drivers/staging/vt6656/baseband.c > > +++ b/drivers/staging/vt6656/baseband.c > > @@ -442,7 +442,8 @@ int vnt_vt3184_init(struct vnt_private *priv) > > if (ret) > > goto end; > > > > - ret =3D vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, BIT(0)); > > + ret =3D vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, > > + PAPEDELAY_B0); > > This doesn't clarify anything. It makes it less clear because someone > would assume B0 means something but it's just hiding a magic number > behind a meaningless define. B0 means BIT(0) which means nothing. So > now we have to jump through two hoops to find out that we don't know > anything. > I created this names due to the lack of information about the hardware. I searched but I did not find anything. > Just leave it as-is. Same for the rest. Ok. > > There problem is a hardware spec which explains what this stuff is. > It's possible to find a datasheet of this hardware to make this modificati= on accordingly to the correct bit names of registers ? > regards, > dan carpenter > Thanks, oscar carter