* [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout
@ 2015-02-08 8:03 Nicholas Mc Guire
[not found] ` <1423382611-24463-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Mc Guire @ 2015-02-08 8:03 UTC (permalink / raw)
To: Seth Heasley
Cc: Neil Horman, Wolfram Sang, Fan Du, Jingoo Han, linux-i2c,
linux-kernel, Nicholas Mc Guire
return type of wait_for_completion_timeout is unsigned long not int. As
ret is in used for other calls a new appropriately typed variable timeout
is added to handle wait_for_completion_timeout
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
Patch was only compile tested with x86_64_defconfig + CONFIG_I2C_ISMT=m
Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
drivers/i2c/busses/i2c-ismt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index f2b0ff0..2197ac8 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -380,6 +380,7 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
int size, union i2c_smbus_data *data)
{
int ret;
+ unsigned long timeout;
dma_addr_t dma_addr = 0; /* address of the data buffer */
u8 dma_size = 0;
enum dma_data_direction dma_direction = 0;
@@ -578,13 +579,13 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
ismt_submit_desc(priv);
/* Now we wait for interrupt completion, 1s */
- ret = wait_for_completion_timeout(&priv->cmp, HZ*1);
+ timeout = wait_for_completion_timeout(&priv->cmp, HZ*1);
/* unmap the data buffer */
if (dma_size != 0)
dma_unmap_single(&adap->dev, dma_addr, dma_size, dma_direction);
- if (unlikely(!ret)) {
+ if (unlikely(!timeout)) {
dev_err(dev, "completion wait timed out\n");
ret = -ETIMEDOUT;
goto out;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1423382611-24463-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>]
* Re: [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout 2015-02-08 8:03 [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout Nicholas Mc Guire @ 2015-02-08 13:53 ` Neil Horman 0 siblings, 0 replies; 5+ messages in thread From: Neil Horman @ 2015-02-08 13:53 UTC (permalink / raw) To: Nicholas Mc Guire Cc: Seth Heasley, Wolfram Sang, Fan Du, Jingoo Han, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Sun, Feb 08, 2015 at 03:03:30AM -0500, Nicholas Mc Guire wrote: > return type of wait_for_completion_timeout is unsigned long not int. As > ret is in used for other calls a new appropriately typed variable timeout > is added to handle wait_for_completion_timeout > > Signed-off-by: Nicholas Mc Guire <hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org> Acked-by: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout @ 2015-02-08 13:53 ` Neil Horman 0 siblings, 0 replies; 5+ messages in thread From: Neil Horman @ 2015-02-08 13:53 UTC (permalink / raw) To: Nicholas Mc Guire Cc: Seth Heasley, Wolfram Sang, Fan Du, Jingoo Han, linux-i2c, linux-kernel On Sun, Feb 08, 2015 at 03:03:30AM -0500, Nicholas Mc Guire wrote: > return type of wait_for_completion_timeout is unsigned long not int. As > ret is in used for other calls a new appropriately typed variable timeout > is added to handle wait_for_completion_timeout > > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout 2015-02-08 8:03 [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout Nicholas Mc Guire @ 2015-03-15 10:02 ` Wolfram Sang 0 siblings, 0 replies; 5+ messages in thread From: Wolfram Sang @ 2015-03-15 10:02 UTC (permalink / raw) To: Nicholas Mc Guire Cc: Seth Heasley, Neil Horman, Fan Du, Jingoo Han, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 434 bytes --] On Sun, Feb 08, 2015 at 03:03:30AM -0500, Nicholas Mc Guire wrote: > return type of wait_for_completion_timeout is unsigned long not int. As > ret is in used for other calls a new appropriately typed variable timeout > is added to handle wait_for_completion_timeout > > Signed-off-by: Nicholas Mc Guire <hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org> Fixed variable name to 'time_left' and applied to for-next, thanks! [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout @ 2015-03-15 10:02 ` Wolfram Sang 0 siblings, 0 replies; 5+ messages in thread From: Wolfram Sang @ 2015-03-15 10:02 UTC (permalink / raw) To: Nicholas Mc Guire Cc: Seth Heasley, Neil Horman, Fan Du, Jingoo Han, linux-i2c, linux-kernel [-- Attachment #1: Type: text/plain, Size: 404 bytes --] On Sun, Feb 08, 2015 at 03:03:30AM -0500, Nicholas Mc Guire wrote: > return type of wait_for_completion_timeout is unsigned long not int. As > ret is in used for other calls a new appropriately typed variable timeout > is added to handle wait_for_completion_timeout > > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Fixed variable name to 'time_left' and applied to for-next, thanks! [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-15 10:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-08 8:03 [PATCH] i2c: ismt: fix type of return var of wait_for_completion_timeout Nicholas Mc Guire
[not found] ` <1423382611-24463-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>
2015-02-08 13:53 ` Neil Horman
2015-02-08 13:53 ` Neil Horman
2015-03-15 10:02 ` Wolfram Sang
2015-03-15 10:02 ` 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.