* [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success
@ 2018-05-09 19:46 Peter Rosin
2018-05-09 19:46 ` [PATCH 2/2] i2c: pmcmsp: fix error return from master_xfer Peter Rosin
2018-05-15 7:28 ` [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success Wolfram Sang
0 siblings, 2 replies; 4+ messages in thread
From: Peter Rosin @ 2018-05-09 19:46 UTC (permalink / raw)
To: linux-kernel
Cc: Peter Rosin, Andy Shevchenko, Wolfram Sang, Gustavo A. R. Silva,
linux-i2c
Returning zero is wrong in this case.
Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/i2c/busses/i2c-pmcmsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c
index 2aa0e83174c5..ec27e27e8d06 100644
--- a/drivers/i2c/busses/i2c-pmcmsp.c
+++ b/drivers/i2c/busses/i2c-pmcmsp.c
@@ -567,7 +567,7 @@ static int pmcmsptwi_master_xfer(struct i2c_adapter *adap,
return -1;
}
- return 0;
+ return num;
}
static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter)
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] i2c: pmcmsp: fix error return from master_xfer
2018-05-09 19:46 [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success Peter Rosin
@ 2018-05-09 19:46 ` Peter Rosin
2018-05-15 7:28 ` Wolfram Sang
2018-05-15 7:28 ` [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: Peter Rosin @ 2018-05-09 19:46 UTC (permalink / raw)
To: linux-kernel
Cc: Peter Rosin, Andy Shevchenko, Wolfram Sang, Gustavo A. R. Silva,
linux-i2c
Returning -1 (-EPERM) is not appropriate here, go with -EIO.
Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/i2c/busses/i2c-pmcmsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c
index ec27e27e8d06..dae8ac618a52 100644
--- a/drivers/i2c/busses/i2c-pmcmsp.c
+++ b/drivers/i2c/busses/i2c-pmcmsp.c
@@ -564,7 +564,7 @@ static int pmcmsptwi_master_xfer(struct i2c_adapter *adap,
* TODO: We could potentially loop and retry in the case
* of MSP_TWI_XFER_TIMEOUT.
*/
- return -1;
+ return -EIO;
}
return num;
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success
2018-05-09 19:46 [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success Peter Rosin
2018-05-09 19:46 ` [PATCH 2/2] i2c: pmcmsp: fix error return from master_xfer Peter Rosin
@ 2018-05-15 7:28 ` Wolfram Sang
1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-05-15 7:28 UTC (permalink / raw)
To: Peter Rosin; +Cc: linux-kernel, Andy Shevchenko, Gustavo A. R. Silva, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
On Wed, May 09, 2018 at 09:46:29PM +0200, Peter Rosin wrote:
> Returning zero is wrong in this case.
>
> Signed-off-by: Peter Rosin <peda@axentia.se>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] i2c: pmcmsp: fix error return from master_xfer
2018-05-09 19:46 ` [PATCH 2/2] i2c: pmcmsp: fix error return from master_xfer Peter Rosin
@ 2018-05-15 7:28 ` Wolfram Sang
0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2018-05-15 7:28 UTC (permalink / raw)
To: Peter Rosin; +Cc: linux-kernel, Andy Shevchenko, Gustavo A. R. Silva, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
On Wed, May 09, 2018 at 09:46:30PM +0200, Peter Rosin wrote:
> Returning -1 (-EPERM) is not appropriate here, go with -EIO.
>
> Signed-off-by: Peter Rosin <peda@axentia.se>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-15 7:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 19:46 [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success Peter Rosin
2018-05-09 19:46 ` [PATCH 2/2] i2c: pmcmsp: fix error return from master_xfer Peter Rosin
2018-05-15 7:28 ` Wolfram Sang
2018-05-15 7:28 ` [PATCH 1/2] i2c: pmcmsp: return message count on master_xfer success 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.