Message ID | 1465582101-19391-3-git-send-email-sricharan@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
+Wolfram Sang >-----Original Message----- >From: linux-arm-kernel [mailto:linux-arm-kernel-bounces@lists.infradead.org] On Behalf Of Sricharan R >Sent: Friday, June 10, 2016 11:38 PM >To: linux-arm-msm@vger.kernel.org; ntelkar@codeaurora.org; galak@codeaurora.org; linux-kernel@vger.kernel.org; >andy.gross@linaro.org; linux-i2c@vger.kernel.org; agross@codeaurora.org; linux-arm-kernel@lists.infradead.org; >nkaje@codeaurora.org; absahu@codeaurora.org >Cc: sricharan@codeaurora.org >Subject: [PATCH V4 2/3] i2c: qup: Fix wrong value of index variable > >index gets incremented during check to determine if the >messages can be transferred with dma. But not reset after >that, resulting in wrong start value in subsequent loop, >causing failure. Fix it. > >Signed-off-by: Sricharan R <sricharan@codeaurora.org> >--- > drivers/i2c/busses/i2c-qup.c | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c >index 43adc2d..b8116e5 100644 >--- a/drivers/i2c/busses/i2c-qup.c >+++ b/drivers/i2c/busses/i2c-qup.c >@@ -1260,6 +1260,8 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap, > } > } > >+ idx = 0; >+ > do { > if (msgs[idx].len == 0) { > ret = -EINVAL; >-- >QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux >Foundation > > >_______________________________________________ >linux-arm-kernel mailing list >linux-arm-kernel@lists.infradead.org >http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Fri, Jun 10, 2016 at 11:38:20PM +0530, Sricharan R wrote: > index gets incremented during check to determine if the > messages can be transferred with dma. But not reset after > that, resulting in wrong start value in subsequent loop, > causing failure. Fix it. > > Signed-off-by: Sricharan R <sricharan@codeaurora.org> Applied to for-next, thanks!
On Sat, Jun 18, 2016 at 06:21:39PM +0200, Wolfram Sang wrote: > On Fri, Jun 10, 2016 at 11:38:20PM +0530, Sricharan R wrote: > > index gets incremented during check to determine if the > > messages can be transferred with dma. But not reset after > > that, resulting in wrong start value in subsequent loop, > > causing failure. Fix it. > > > > Signed-off-by: Sricharan R <sricharan@codeaurora.org> > > Applied to for-next, thanks! Reconsidered and applied to for-current.
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c index 43adc2d..b8116e5 100644 --- a/drivers/i2c/busses/i2c-qup.c +++ b/drivers/i2c/busses/i2c-qup.c @@ -1260,6 +1260,8 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap, } } + idx = 0; + do { if (msgs[idx].len == 0) { ret = -EINVAL;
index gets incremented during check to determine if the messages can be transferred with dma. But not reset after that, resulting in wrong start value in subsequent loop, causing failure. Fix it. Signed-off-by: Sricharan R <sricharan@codeaurora.org> --- drivers/i2c/busses/i2c-qup.c | 2 ++ 1 file changed, 2 insertions(+)