From: "Nuno Sá" <noname.nuno@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Alisa-Dariana Roman" <alisadariana@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Alisa-Dariana Roman" <alisa.roman@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>
Subject: Re: [PATCH v1 1/1] iio: adc: ad7191: Don't check for specific errors when parsing properties
Date: Tue, 14 Apr 2026 11:02:02 +0100 [thread overview]
Message-ID: <ad4QXydZlq5L-JS7@nsa> (raw)
In-Reply-To: <ad4J_iWzGpwXsxFz@ashevche-desk.local>
On Tue, Apr 14, 2026 at 12:33:50PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 14, 2026 at 12:31:14PM +0300, Andy Shevchenko wrote:
> > On Tue, Apr 14, 2026 at 10:10:38AM +0100, Nuno Sá wrote:
> > > On Sun, Apr 12, 2026 at 03:30:40PM +0100, Jonathan Cameron wrote:
> > > > On Tue, 17 Mar 2026 12:42:07 +0200
> > > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> ...
>
> > > > I left this one for a while to see if the discussion would continue but seems not.
> > > > I'm not sure it is always the case, but in this particular example I think the
> > > > resulting code is a little nicer to read so applied.
> > > >
> > > > So for me, case by case basis for this sort of change.
> > >
> > > Yeah, I missed this one! Anyways seems the way will be to explicitly
> > > use device_property_present() to check property presence. Still don't
> > > love the dual call thing so I might just stop checking for -EINVAL (was
> > > not doing it religiously anyways).
> > >
> > > Maybe we could have a set of optional variants of the API like
> > > device_property_read_*_optional() kind of thing where we just return 0
> > > if the property is not present. But might also be too noisy...
> >
> > I think that's what usually Sakari likes (tons of wrappers for each case :-).
> > I prefer be on the compromise side.
>
> Ah, and note, now we have kernel-doc updated to point out that _present is
> recommended way of unambiguously checking for the property presence.
>
> 70fa0c308aa2 ("device property: Document how to check for the property presence")
Yes, I did looked at it! That's why I said
"Anyways seems the way will be to explicitly use device_property_present()..."
- Nuno Sá
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
prev parent reply other threads:[~2026-04-14 10:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 14:39 [PATCH v1 1/1] iio: adc: ad7191: Don't check for specific errors when parsing properties Andy Shevchenko
2026-02-20 10:04 ` Nuno Sá
2026-02-20 10:33 ` Andy Shevchenko
2026-03-17 10:42 ` Andy Shevchenko
2026-04-12 14:30 ` Jonathan Cameron
2026-04-14 9:10 ` Nuno Sá
2026-04-14 9:31 ` Andy Shevchenko
2026-04-14 9:33 ` Andy Shevchenko
2026-04-14 10:02 ` Nuno Sá [this message]
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=ad4QXydZlq5L-JS7@nsa \
--to=noname.nuno@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=alisa.roman@analog.com \
--cc=alisadariana@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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.