From: <jorcrous@amazon.com>
To: <linux-arm-msm@vger.kernel.org>
Cc: Jordan Crouse <jorcrous@amazon.com>,
Akash Asthana <akashast@codeaurora.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Mukesh Savaliya <msavaliy@codeaurora.org>,
Vinod Koul <vkoul@kernel.org>, <linux-i2c@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] i2c: qcom-geni: Fix return value for master_xfer
Date: Wed, 9 Feb 2022 21:03:56 +0000 [thread overview]
Message-ID: <20220209210356.2848-1-jorcrous@amazon.com> (raw)
From: Jordan Crouse <jorcrous@amazon.com>
The master_xfer function is supposed to return the number of messages that
were processed. Both geni_i2c_gpi_xfer and geni_i2c_fifo_xfer are
returning 0 which is being interpeted as a error in the upper layers.
Fixes: 8133682618cb ("i2c: qcom-geni: Add support for GPI DMA")
Signed-off-by: Jordan Crouse <jorcrous@amazon.com>
---
drivers/i2c/busses/i2c-qcom-geni.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index c5345f3421a8..e008161e1a67 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -619,7 +619,7 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
geni_i2c_gpi_unmap(gi2c, &msgs[i], tx_buf, tx_addr, rx_buf, rx_addr);
}
- return 0;
+ return num;
err:
dmaengine_terminate_sync(gi2c->rx_c);
@@ -645,10 +645,10 @@ static int geni_i2c_fifo_xfer(struct geni_i2c_dev *gi2c,
ret = geni_i2c_tx_one_msg(gi2c, &msgs[i], m_param);
if (ret)
- break;
+ return ret;
}
- return ret;
+ return num;
}
static int geni_i2c_xfer(struct i2c_adapter *adap,
--
2.32.0
next reply other threads:[~2022-02-09 21:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 21:03 jorcrous [this message]
2022-02-18 9:44 ` [PATCH] i2c: qcom-geni: Fix return value for master_xfer Wolfram Sang
2022-02-18 11:05 ` Vinod Koul
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=20220209210356.2848-1-jorcrous@amazon.com \
--to=jorcrous@amazon.com \
--cc=agross@kernel.org \
--cc=akashast@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msavaliy@codeaurora.org \
--cc=vkoul@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).