From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: devnull+fnkl.kernel.gmail.com@kernel.org, alyssa@rosenzweig.io,
asahi@lists.linux.dev, conor+dt@kernel.org,
devicetree@vger.kernel.org, fnkl.kernel@gmail.com, j@jannau.net,
krzk+dt@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
marcan@marcan.st, neal@gompa.dev, robh@kernel.org,
rydberg@bitmath.org, sven@svenpeter.dev
Subject: Re: [PATCH v4 2/4] input: apple_z2: Add a driver for Apple Z2 touchscreens
Date: Thu, 16 Jan 2025 10:15:33 -0800 [thread overview]
Message-ID: <Z4lMxdFWrZorX0h2@google.com> (raw)
In-Reply-To: <3991ab78-d1a2-4cae-bea5-fb4dfa58aba3@wanadoo.fr>
On Thu, Jan 16, 2025 at 07:03:13PM +0100, Christophe JAILLET wrote:
> Le 15/01/2025 à 23:46, Sasha Finkelstein via B4 Relay a écrit :
>
> > +
> > + /* Wait for device reset to finish */
> > + usleep_range(5000, 10000);
> > + error = apple_z2_boot(z2);
> > + if (error)
> > + return error;
> > + return 0;
>
> Nitpick: These 4 lines could be just:
> return apple_z2_boot(z2);
The current form is actually my preference - if a function has multiple
points of failure then do
error = action(...);
if (error)
return error;
everywhere with final "return 0;" at the end. This way it is easier to
rearrange code if needed.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2025-01-16 18:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 22:46 [PATCH v4 0/4] Driver for Apple Z2 touchscreens Sasha Finkelstein via B4 Relay
2025-01-15 22:46 ` [PATCH v4 1/4] dt-bindings: input: touchscreen: Add Z2 controller Sasha Finkelstein via B4 Relay
2025-01-15 22:46 ` [PATCH v4 2/4] input: apple_z2: Add a driver for Apple Z2 touchscreens Sasha Finkelstein via B4 Relay
2025-01-16 18:03 ` Christophe JAILLET
2025-01-16 18:15 ` Dmitry Torokhov [this message]
2025-01-16 18:29 ` Christophe JAILLET
2025-01-16 18:41 ` Sasha Finkelstein
2025-01-15 22:46 ` [PATCH v4 3/4] arm64: dts: apple: Add touchbar digitizer nodes Sasha Finkelstein via B4 Relay
2025-01-18 12:27 ` Sven Peter
2025-01-15 22:46 ` [PATCH v4 4/4] MAINTAINERS: Add entries for Apple Z2 touchscreen driver Sasha Finkelstein via B4 Relay
2025-01-18 12:26 ` Sven Peter
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=Z4lMxdFWrZorX0h2@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+fnkl.kernel.gmail.com@kernel.org \
--cc=fnkl.kernel@gmail.com \
--cc=j@jannau.net \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=neal@gompa.dev \
--cc=robh@kernel.org \
--cc=rydberg@bitmath.org \
--cc=sven@svenpeter.dev \
/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