* [PATCH] i2c: qup: disable clks and return instead of just returning error
@ 2014-08-06 7:48 Pramod Gurav
0 siblings, 0 replies; 8+ messages in thread
From: Pramod Gurav @ 2014-08-06 7:48 UTC (permalink / raw)
To: linux-i2c, linux-kernel, linux-arm-msm; +Cc: Pramod Gurav
This fixes a error handling scenario where clocks were not being disabled
when QUP_OUTPUT_BLOCK_SIZE returns a size greater thanat size of blk_sizes
array. So this patch adds a statement to jump to err lable to release the
clocks.
Wolfram Sang <wsa@the-dreams.de>
Grant Likely <grant.likely@linaro.org>
Bjorn Andersson <bjorn.andersson@sonymobile.com>
Andy Gross <agross@codeaurora.org>
"Ivan T. Ivanov" <iivanov@mm-sol.com>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
drivers/i2c/busses/i2c-qup.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 2a5efb5..3a4d64e 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -633,13 +633,17 @@ static int qup_i2c_probe(struct platform_device *pdev)
* associated with each byte written/received
*/
size = QUP_OUTPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->out_blk_sz = blk_sizes[size] / 2;
size = QUP_INPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->in_blk_sz = blk_sizes[size] / 2;
size = QUP_OUTPUT_FIFO_SIZE(io_mode);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] i2c: qup: disable clks and return instead of just returning error
2014-08-06 12:33 ` Pramod Gurav
(?)
@ 2014-08-09 19:32 ` Wolfram Sang
-1 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2014-08-09 19:32 UTC (permalink / raw)
To: Pramod Gurav
Cc: linux-i2c, linux-kernel, linux-arm-msm, Grant Likely,
Bjorn Andersson, Andy Gross, Ivan T. Ivanov
[-- Attachment #1: Type: text/plain, Size: 861 bytes --]
(Ooops, this mail got somehow into my postponed folder. Sending
anyhow...)
On Wed, Aug 06, 2014 at 06:03:25PM +0530, Pramod Gurav wrote:
> This fixes a error handling scenario where clocks were not being disabled
> when QUP_OUTPUT_BLOCK_SIZE returns a size greater than the size of blk_sizes
> array. So this patch adds a statement to jump to the fail lable to release the
> clocks.
>
> CC: Wolfram Sang <wsa@the-dreams.de>
> CC: Grant Likely <grant.likely@linaro.org>
> CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> CC: Andy Gross <agross@codeaurora.org>
> CC: "Ivan T. Ivanov" <iivanov@mm-sol.com>
>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Applied to for-next with Ivan's ack from V2, thanks!
Please use "[PATCH V3]" and alike in the future to make it more obvious
which version is the most recent.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] i2c: qup: disable clks and return instead of just returning error
@ 2014-08-06 12:33 ` Pramod Gurav
0 siblings, 0 replies; 8+ messages in thread
From: Pramod Gurav @ 2014-08-06 12:33 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
Cc: Pramod Gurav, Wolfram Sang, Grant Likely, Bjorn Andersson,
Andy Gross, Ivan T. Ivanov
This fixes a error handling scenario where clocks were not being disabled
when QUP_OUTPUT_BLOCK_SIZE returns a size greater than the size of blk_sizes
array. So this patch adds a statement to jump to the fail lable to release the
clocks.
CC: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
CC: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
CC: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
CC: Andy Gross <agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
CC: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Pramod Gurav <pramod.gurav-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
---
Resending the patch by updating CCs list.
Fixed Typos in commit message noticed by Christopher.
drivers/i2c/busses/i2c-qup.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 2a5efb5..3a4d64e 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -633,13 +633,17 @@ static int qup_i2c_probe(struct platform_device *pdev)
* associated with each byte written/received
*/
size = QUP_OUTPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->out_blk_sz = blk_sizes[size] / 2;
size = QUP_INPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->in_blk_sz = blk_sizes[size] / 2;
size = QUP_OUTPUT_FIFO_SIZE(io_mode);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] i2c: qup: disable clks and return instead of just returning error
@ 2014-08-06 12:33 ` Pramod Gurav
0 siblings, 0 replies; 8+ messages in thread
From: Pramod Gurav @ 2014-08-06 12:33 UTC (permalink / raw)
To: linux-i2c, linux-kernel, linux-arm-msm
Cc: Pramod Gurav, Wolfram Sang, Grant Likely, Bjorn Andersson,
Andy Gross, Ivan T. Ivanov
This fixes a error handling scenario where clocks were not being disabled
when QUP_OUTPUT_BLOCK_SIZE returns a size greater than the size of blk_sizes
array. So this patch adds a statement to jump to the fail lable to release the
clocks.
CC: Wolfram Sang <wsa@the-dreams.de>
CC: Grant Likely <grant.likely@linaro.org>
CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
CC: Andy Gross <agross@codeaurora.org>
CC: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
Resending the patch by updating CCs list.
Fixed Typos in commit message noticed by Christopher.
drivers/i2c/busses/i2c-qup.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 2a5efb5..3a4d64e 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -633,13 +633,17 @@ static int qup_i2c_probe(struct platform_device *pdev)
* associated with each byte written/received
*/
size = QUP_OUTPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->out_blk_sz = blk_sizes[size] / 2;
size = QUP_INPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->in_blk_sz = blk_sizes[size] / 2;
size = QUP_OUTPUT_FIFO_SIZE(io_mode);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] i2c: qup: disable clks and return instead of just returning error
2014-08-06 7:53 Pramod Gurav
[not found] ` <1407311602-15751-1-git-send-email-pramod.gurav-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
@ 2014-08-06 12:19 ` Christopher Covington
1 sibling, 0 replies; 8+ messages in thread
From: Christopher Covington @ 2014-08-06 12:19 UTC (permalink / raw)
To: Pramod Gurav
Cc: linux-i2c, linux-kernel, linux-arm-msm, Wolfram Sang,
Grant Likely, Bjorn Andersson, Andy Gross, Ivan T. Ivanov
Hi Pramod,
Not a big deal, but some typos caught my eye.
On 08/06/2014 03:53 AM, Pramod Gurav wrote:
> This fixes a error handling scenario where clocks were not being disabled
> when QUP_OUTPUT_BLOCK_SIZE returns a size greater thanat size of blk_sizes
s/thanat/than the/
> array. So this patch adds a statement to jump to err lable to release the
s/err lable/the error label/ or s/err lable/the fail label/
Regards,
Christopher
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i2c: qup: disable clks and return instead of just returning error
2014-08-06 7:53 Pramod Gurav
@ 2014-08-06 11:21 ` Ivan T. Ivanov
2014-08-06 12:19 ` Christopher Covington
1 sibling, 0 replies; 8+ messages in thread
From: Ivan T. Ivanov @ 2014-08-06 11:21 UTC (permalink / raw)
To: Pramod Gurav
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang, Grant Likely,
Bjorn Andersson, Andy Gross
On Wed, 2014-08-06 at 13:23 +0530, Pramod Gurav wrote:
> This fixes a error handling scenario where clocks were not being disabled
> when QUP_OUTPUT_BLOCK_SIZE returns a size greater thanat size of blk_sizes
> array. So this patch adds a statement to jump to err lable to release the
> clocks.
>
> CC: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> CC: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> CC: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> CC: Andy Gross <agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> CC: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
>
> Signed-off-by: Pramod Gurav <pramod.gurav-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
Acked-by: Ivan T. Ivanov <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] i2c: qup: disable clks and return instead of just returning error
@ 2014-08-06 11:21 ` Ivan T. Ivanov
0 siblings, 0 replies; 8+ messages in thread
From: Ivan T. Ivanov @ 2014-08-06 11:21 UTC (permalink / raw)
To: Pramod Gurav
Cc: linux-i2c, linux-kernel, linux-arm-msm, Wolfram Sang,
Grant Likely, Bjorn Andersson, Andy Gross
On Wed, 2014-08-06 at 13:23 +0530, Pramod Gurav wrote:
> This fixes a error handling scenario where clocks were not being disabled
> when QUP_OUTPUT_BLOCK_SIZE returns a size greater thanat size of blk_sizes
> array. So this patch adds a statement to jump to err lable to release the
> clocks.
>
> CC: Wolfram Sang <wsa@the-dreams.de>
> CC: Grant Likely <grant.likely@linaro.org>
> CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> CC: Andy Gross <agross@codeaurora.org>
> CC: "Ivan T. Ivanov" <iivanov@mm-sol.com>
>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Acked-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] i2c: qup: disable clks and return instead of just returning error
@ 2014-08-06 7:53 Pramod Gurav
[not found] ` <1407311602-15751-1-git-send-email-pramod.gurav-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
2014-08-06 12:19 ` Christopher Covington
0 siblings, 2 replies; 8+ messages in thread
From: Pramod Gurav @ 2014-08-06 7:53 UTC (permalink / raw)
To: linux-i2c, linux-kernel, linux-arm-msm
Cc: Pramod Gurav, Wolfram Sang, Grant Likely, Bjorn Andersson,
Andy Gross, Ivan T. Ivanov
This fixes a error handling scenario where clocks were not being disabled
when QUP_OUTPUT_BLOCK_SIZE returns a size greater thanat size of blk_sizes
array. So this patch adds a statement to jump to err lable to release the
clocks.
CC: Wolfram Sang <wsa@the-dreams.de>
CC: Grant Likely <grant.likely@linaro.org>
CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
CC: Andy Gross <agross@codeaurora.org>
CC: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
Resending the patch by updating CCs list.
drivers/i2c/busses/i2c-qup.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 2a5efb5..3a4d64e 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -633,13 +633,17 @@ static int qup_i2c_probe(struct platform_device *pdev)
* associated with each byte written/received
*/
size = QUP_OUTPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->out_blk_sz = blk_sizes[size] / 2;
size = QUP_INPUT_BLOCK_SIZE(io_mode);
- if (size >= ARRAY_SIZE(blk_sizes))
- return -EIO;
+ if (size >= ARRAY_SIZE(blk_sizes)) {
+ ret = -EIO;
+ goto fail;
+ }
qup->in_blk_sz = blk_sizes[size] / 2;
size = QUP_OUTPUT_FIFO_SIZE(io_mode);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-09 19:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 7:48 [PATCH] i2c: qup: disable clks and return instead of just returning error Pramod Gurav
2014-08-06 7:53 Pramod Gurav
[not found] ` <1407311602-15751-1-git-send-email-pramod.gurav-edOiRQu9Xnj5XLMNweQjbQ@public.gmane.org>
2014-08-06 11:21 ` Ivan T. Ivanov
2014-08-06 11:21 ` Ivan T. Ivanov
2014-08-06 12:19 ` Christopher Covington
2014-08-06 12:33 Pramod Gurav
2014-08-06 12:33 ` Pramod Gurav
2014-08-09 19:32 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.