From: Mark Brown <broonie@kernel.org>
To: "Alex A. Mihaylov" <minimumlaw@rambler.ru>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Reichel <sre@kernel.org>,
Evgeniy Polyakov <zbr@ioremap.net>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support
Date: Mon, 29 May 2017 14:13:46 +0100 [thread overview]
Message-ID: <20170529131346.gsauzllpplc2e7vy@sirena.org.uk> (raw)
In-Reply-To: <20170528071120.6604-2-minimumlaw@rambler.ru>
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
On Sun, May 28, 2017 at 10:11:18AM +0300, Alex A. Mihaylov wrote:
> + int ret = -ENODEV;
> +
> + mutex_lock(&sl->master->bus_mutex);
> + if (!w1_reset_select_slave(sl)) {
> + w1_write_8(sl->master, W1_CMD_READ_DATA);
> + w1_write_8(sl->master, reg);
> + *val = w1_read_8(sl->master);
> + ret = 0;
> + }
I asked you to move the error handling into the else case in these :(
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2017-05-29 13:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 7:11 [PATCH 0/3] Battery monitor MAX1721x with w1-regmap and w1-slave Alex A. Mihaylov
2017-05-28 7:11 ` [PATCH 1/3] regmap: Add OneWire (W1) bus support Alex A. Mihaylov
2017-05-29 13:13 ` Mark Brown [this message]
2017-05-29 16:37 ` Alex A. Mihaylov
2017-05-30 11:50 ` Mark Brown
2017-05-29 15:07 ` Geert Uytterhoeven
2017-05-28 7:11 ` [PATCH 2/3] w1: Add Maxim Semiconductor MAX1721x W1 slave drivers Alex A. Mihaylov
2017-05-28 7:11 ` [PATCH 3/3] power: supply: Add support MAX1721x battery monitor Alex A. Mihaylov
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=20170529131346.gsauzllpplc2e7vy@sirena.org.uk \
--to=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=minimumlaw@rambler.ru \
--cc=sre@kernel.org \
--cc=zbr@ioremap.net \
/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