From: Eugene Zalkonnikov <ez@norphonic.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
"development@norphonic.com" <development@norphonic.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH v6 1/2] Driver for TI HDC20x0 humidity and temperature sensors
Date: Mon, 23 Mar 2020 14:39:34 +0000 [thread overview]
Message-ID: <F8BF24B6-5686-437E-8EE4-1A2151C848CF@norphonic.com> (raw)
In-Reply-To: <20200322161722.0feb8da8@archlinux>
Hi Jonathan,
> On 22 Mar 2020, at 17:17, Jonathan Cameron <jic23@kernel.org> wrote:
>> +static int hdc2010_write_raw(struct iio_dev *indio_dev,
>> + struct iio_chan_spec const *chan,
>> + int val, int val2, long mask)
>> +{
>> + struct hdc2010_data *data = iio_priv(indio_dev);
>> + int new, ret = -EINVAL;
>
> Unless I'm half asleep (which is possible :) ret is always
> written below before being used. Hence this init isn't needed.
>
I suspect it’s a vestige from before all stylistic rewrites in recent patches.
Same for the shared returns. Will change that.
>> +
>> + indio_dev->dev.parent = &client->dev;
>> + indio_dev->name = dev_name(&client->dev);
>
> That should be the part number. IIRC that's not what you'll get
> from dev_name called on the i2c device. Note we let a few of
> these in in the past and are now stuck with them...
>
My access to actual hw is limited now, so to reduce the iterations here: what
is going to be a suitable device name? Would “hdc20x0” do? “hdc2010”?
Regards,
Eugene.
next prev parent reply other threads:[~2020-03-23 14:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 20:06 [PATCH v6 1/2] Driver for TI HDC20x0 humidity and temperature sensors Eugene Zalkonnikov
2020-03-17 20:09 ` [PATCH v6 2/2] Device tree bindings " Eugene Zalkonnikov
2020-03-18 22:59 ` Rob Herring
2020-03-22 16:03 ` Jonathan Cameron
2020-03-22 16:17 ` [PATCH v6 1/2] Driver " Jonathan Cameron
2020-03-23 14:39 ` Eugene Zalkonnikov [this message]
2020-03-28 15:21 ` Jonathan Cameron
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=F8BF24B6-5686-437E-8EE4-1A2151C848CF@norphonic.com \
--to=ez@norphonic.com \
--cc=development@norphonic.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).