From: Johan Hovold <johan@kernel.org>
To: Wolfram Sang <wsa@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Vinod Koul <vkoul@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] i2c: qcom-geni: Use the correct return value
Date: Sun, 24 Jul 2022 09:30:53 +0200 [thread overview]
Message-ID: <Ytz1LUSwyZ/8LiN6@hovoldconsulting.com> (raw)
In-Reply-To: <YtzSzKmakEWe1usg@shikoro>
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
On Sun, Jul 24, 2022 at 07:04:12AM +0200, Wolfram Sang wrote:
>
> > - return num;
> > + return ret;
>
> Not quite. Kdoc describes the retval in i2c_transfer.
>
> 2136 * i2c_transfer - execute a single or combined I2C message
> 2137 * @adap: Handle to I2C bus
> 2138 * @msgs: One or more messages to execute before STOP is issued to
> 2139 * terminate the operation; each message begins with a START.
> 2140 * @num: Number of messages to be executed.
> 2141 *
> 2142 * Returns negative errno, else the number of messages executed.
And this is exactly what the driver is returning after this fix.
Note that ret above is assigned based on the return value from two
helper functions that return either a negative errno or the number
messages executed.
So I believe this patch is still needed to fix the error handling.
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Johan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-07-24 7:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 3:50 [PATCH 0/3] i2c: qcom-geni: Make it possible to run i2cdetect Bjorn Andersson
2022-07-17 3:50 ` [PATCH 1/3] i2c: qcom-geni: Use the correct return value Bjorn Andersson
2022-07-18 5:36 ` Vinod Koul
2022-07-18 22:28 ` Bjorn Andersson
2022-07-19 20:36 ` Andrew Halaney
2022-07-20 4:31 ` Vinod Koul
2022-07-24 5:04 ` Wolfram Sang
2022-07-24 7:30 ` Johan Hovold [this message]
2022-07-24 18:37 ` Wolfram Sang
2022-07-24 18:39 ` Wolfram Sang
2022-07-17 3:50 ` [PATCH 2/3] i2c: qcom-geni: Propagate GENI_ABORT_DONE to geni_i2c_abort_xfer() Bjorn Andersson
2022-07-18 5:36 ` Vinod Koul
2022-07-19 20:50 ` Andrew Halaney
2022-07-19 20:57 ` Andrew Halaney
2022-07-24 5:15 ` Wolfram Sang
2022-07-24 5:15 ` Wolfram Sang
2022-07-17 3:50 ` [PATCH 3/3] i2c: qcom-geni: Silence NACK and GENI_TIMEOUT Bjorn Andersson
2022-07-18 5:37 ` Vinod Koul
2022-07-24 5:23 ` Wolfram Sang
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=Ytz1LUSwyZ/8LiN6@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
--cc=wsa@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).