From: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
To: Oscar Carter <oscar.carter@gmx.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Forest Bond <forest@alittletooquiet.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Malcolm Priestley <tvboxspy@gmail.com>,
Amir Mahdi Ghorbanian <indigoomega021@gmail.com>,
Colin Ian King <colin.king@canonical.com>,
Gabriela Bittencourt <gabrielabittencourt00@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: vt6656: Use defines in vnt_mac_reg_bits_* functions
Date: Thu, 2 Apr 2020 10:19:17 +0100 [thread overview]
Message-ID: <20200402091917.GA17323@jiffies> (raw)
In-Reply-To: <20200401165537.GC3109@ubuntu>
On 04/01/20 18:55:38, Oscar Carter wrote:
> 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 <dan.carpenter@oracle.com>
> > > Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
> > > ---
> > > 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/vt6656/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 = vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, BIT(0));
> > > + ret = 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 modification
> accordingly to the correct bit names of registers ?
I haven't found any so far, if your researches are luckier than mine, I
would be interested too. Even getting your hands on the actual device is
complicated.
Thanks,
Quentin
next prev parent reply other threads:[~2020-04-02 9:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-28 9:54 [PATCH] staging: vt6656: Use defines in vnt_mac_reg_bits_* functions Oscar Carter
2020-03-31 10:29 ` Dan Carpenter
2020-04-01 16:55 ` Oscar Carter
2020-04-02 9:19 ` Quentin Deslandes [this message]
2020-04-02 10:58 ` Malcolm Priestley
2020-04-02 16:18 ` Oscar Carter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200402091917.GA17323@jiffies \
--to=quentin.deslandes@itdev.co.uk \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gabrielabittencourt00@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=indigoomega021@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oscar.carter@gmx.com \
--cc=tvboxspy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.