From: Thierry Reding <treding@nvidia.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>,
devicetree <devicetree@vger.kernel.org>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
ML dri-devel <dri-devel@lists.freedesktop.org>,
David Airlie <airlied@linux.ie>,
"Rob Herring" <robh+dt@kernel.org>,
Daniel Kurtz <djkurtz@chromium.org>, <drinkcat@chromium.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
"Rob Herring" <robh@kernel.org>
Subject: Re: [PATCH v3 3/3] drm: bridge: anx78xx: Add anx78xx driver support.
Date: Thu, 14 Apr 2016 16:32:04 +0200 [thread overview]
Message-ID: <20160414143203.GD32237@ulmo.ba.sec> (raw)
In-Reply-To: <570FA46B.2080706@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
On Thu, Apr 14, 2016 at 04:08:43PM +0200, Enric Balletbo i Serra wrote:
> Hi Emil,
>
> On 14/04/16 16:06, Emil Velikov wrote:
> > Hi Enric,
> >
> > On 14 April 2016 at 14:42, Enric Balletbo i Serra
> > <enric.balletbo@collabora.com> wrote:
> > > The patch was implemented first without OR'ing error codes. The reason why I
> > > changed this is because I received the comments that checking the error on
> > > every regmap_* didn't help the readability of the driver and is likely to
> > > not fail if the first call doesn't fail.
> > >
> > > For example, originally the code was like this:
> > > http://pastebin.com/rPgyji8k
> > > but I changed to this
> > > http://pastebin.com/rPgyji8k
> > >
> > Both links are the same ;-) But I believe we all get what you meant.
> >
>
> Ooops, sorry. This is the other link
>
> http://pastebin.com/e2KpGxHy
I like the explicit checks better. Like I said, OR'ing the error codes
makes you loose all context and likely give you many similar failures if
for some reason regmap accesses always fail.
Also you're code most likely is required to run in entirety for an
operation to be successful. If the first part of the operation doesn't
succeed it is natural to assume that the whole operation will fail, so
there's no need (and a waste of time) to attempt any subsequent steps.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-04-14 14:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 12:52 [PATCH v3 0/3] Add ANX7814 I2C bridge driver Enric Balletbo i Serra
2016-04-08 12:52 ` [PATCH v3 1/3] of: Add vendor prefix for Analogix Semiconductor Enric Balletbo i Serra
2016-04-08 12:52 ` [PATCH v3 2/3] devicetree: Add ANX7814 SlimPort transmitter binding Enric Balletbo i Serra
2016-04-08 12:52 ` [PATCH v3 3/3] drm: bridge: anx78xx: Add anx78xx driver support Enric Balletbo i Serra
2016-04-14 13:10 ` Thierry Reding
2016-04-14 13:42 ` Enric Balletbo i Serra
2016-04-14 14:06 ` Emil Velikov
2016-04-14 14:08 ` Enric Balletbo i Serra
2016-04-14 14:32 ` Thierry Reding [this message]
2016-04-18 11:23 ` Enric Balletbo i Serra
2016-04-20 12:56 ` Thierry Reding
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=20160414143203.GD32237@ulmo.ba.sec \
--to=treding@nvidia.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=devicetree@vger.kernel.org \
--cc=djkurtz@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@chromium.org \
--cc=emil.l.velikov@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robh@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).