[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VeQ7LNve3bUEgzH2YrMwcihSDs+LHB3fgxy=b6pKH4RcA@mail.gmail.com>
Date: Sun, 5 Apr 2020 13:38:36 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Ivan Mikhaylov <i.mikhaylov@...ro.com>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
linux-iio <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Mark Rutland <mark.rutland@....com>,
Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v6 2/2] iio: proximity: Add driver support for vcnl3020
proximity sensor
On Sun, Apr 5, 2020 at 1:13 PM Jonathan Cameron <jic23@...nel.org> wrote:
> On Thu, 2 Apr 2020 15:42:02 +0300
> Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> > On Thu, Apr 2, 2020 at 11:24 AM Ivan Mikhaylov <i.mikhaylov@...ro.com> wrote:
> > > On Wed, 2020-04-01 at 19:35 +0300, Andy Shevchenko wrote:
> > > > On Wed, Apr 1, 2020 at 7:24 PM Ivan Mikhaylov <i.mikhaylov@...ro.com> wrote:
> > > > > + indio_dev->name = VCNL_DRV_NAME;
> > > >
> > > > It's definitely not a driver name. You have to put part number here.
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/light/tsl4531.c?h=v5.6#n199
> That one is actually fine (if not very pretty) because the driver only supports one part and it happens
> to also be the name of the driver.
>
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/light/max44009.c?h=v5.6#n507
> Also only one part supported, so fine if liable to accidentally get broken if we support more parts.
>
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/light/vl6180.c?h=v5.6#n515
>
> Again, one part supported and the driver has the same name.
>
> >
> > Let's Jonathan speak up.
>
> So, the real point here is not the value being assigned but the fact it's
> explicitly linked to the name of the driver. I'd argue that you could use
> VCNL_NAME as the define and that link is clearly broken. Or just put the string
> inline in both places and don't worry about the tiny bit of replication!
My comments, except this one, to this version are quite minor, so,
after addressing this in a way Jonathan likes,
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
P.S. Don't forget to include given tags in the commit message of next
(fixed) version.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists