From: Jonathan Cameron <jic23@kernel.org>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Matt Ranostay <matt.ranostay@konsulko.com>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: chemical: Add Senseair Sunrise 006-0-007 driver
Date: Sun, 29 Aug 2021 17:05:25 +0100 [thread overview]
Message-ID: <20210829170525.2e84dac1@jic23-huawei> (raw)
In-Reply-To: <20210818080213.d56phfmjlwbgzlca@uno.localdomain>
> Ack
>
> > > + ret = sunrise_read_co2_filtered(client, &co2);
> > > + *val = co2;
> > > + mutex_unlock(&sunrise->lock);
> > > +
> > > + return ret ? ret : IIO_VAL_INT;
> >
> > Can be written as
> >
> > return ret ?: IIO_VAL_INT;
> >
> > but up to maintainers.
> >
>
> You know I never saw this syntax before ? :D
> I'll use it!
I'm rather late to the party, but I'd keep all error handling in driver of the form
if (ret)
return ret;
return IIO_VAL_INT;
That means lazy reviewers like me have one less thing to think about ;)
next prev parent reply other threads:[~2021-08-29 16:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 15:49 [PATCH 0/2] iio: chemical: Add Senseair Sunrise CO2 sensor Jacopo Mondi
2021-08-17 15:49 ` [PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise " Jacopo Mondi
2021-08-17 16:50 ` Andy Shevchenko
2021-08-18 7:29 ` Jacopo Mondi
2021-08-18 16:47 ` Rob Herring
2021-08-18 16:49 ` Rob Herring
2021-08-17 15:49 ` [PATCH 2/2] iio: chemical: Add Senseair Sunrise 006-0-007 driver Jacopo Mondi
2021-08-17 16:58 ` Andy Shevchenko
2021-08-18 8:02 ` Jacopo Mondi
2021-08-18 9:29 ` Andy Shevchenko
2021-08-29 16:05 ` Jonathan Cameron [this message]
2021-08-17 17:01 ` [PATCH 0/2] iio: chemical: Add Senseair Sunrise CO2 sensor Matt Ranostay
2021-08-18 8:03 ` Jacopo Mondi
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=20210829170525.2e84dac1@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jacopo@jmondi.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=matt.ranostay@konsulko.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 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).