* [PATCH] i2c: core: comment says "transmitted" but means "received"
@ 2012-01-25 19:59 Wolfram Sang
[not found] ` <1327521565-14988-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2012-01-25 19:59 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Jean Delvare, Wolfram Sang
Fix that. Also convert this and the related comment to proper commenting
style.
Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
drivers/i2c/i2c-core.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 1e56061..e9c1893 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1386,8 +1386,10 @@ int i2c_master_send(const struct i2c_client *client, const char *buf, int count)
ret = i2c_transfer(adap, &msg, 1);
- /* If everything went ok (i.e. 1 msg transmitted), return #bytes
- transmitted, else error code. */
+ /*
+ * If everything went ok (i.e. 1 msg transmitted), return #bytes
+ * transmitted, else error code.
+ */
return (ret == 1) ? count : ret;
}
EXPORT_SYMBOL(i2c_master_send);
@@ -1414,8 +1416,10 @@ int i2c_master_recv(const struct i2c_client *client, char *buf, int count)
ret = i2c_transfer(adap, &msg, 1);
- /* If everything went ok (i.e. 1 msg transmitted), return #bytes
- transmitted, else error code. */
+ /*
+ * If everything went ok (i.e. 1 msg received), return #bytes received,
+ * else error code.
+ */
return (ret == 1) ? count : ret;
}
EXPORT_SYMBOL(i2c_master_recv);
--
1.7.8.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: core: comment says "transmitted" but means "received"
[not found] ` <1327521565-14988-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2012-01-26 8:02 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2012-01-26 8:02 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Wed, 25 Jan 2012 20:59:25 +0100, Wolfram Sang wrote:
> Fix that. Also convert this and the related comment to proper commenting
> style.
>
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> drivers/i2c/i2c-core.c | 12 ++++++++----
> 1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> index 1e56061..e9c1893 100644
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -1386,8 +1386,10 @@ int i2c_master_send(const struct i2c_client *client, const char *buf, int count)
>
> ret = i2c_transfer(adap, &msg, 1);
>
> - /* If everything went ok (i.e. 1 msg transmitted), return #bytes
> - transmitted, else error code. */
> + /*
> + * If everything went ok (i.e. 1 msg transmitted), return #bytes
> + * transmitted, else error code.
> + */
> return (ret == 1) ? count : ret;
> }
> EXPORT_SYMBOL(i2c_master_send);
> @@ -1414,8 +1416,10 @@ int i2c_master_recv(const struct i2c_client *client, char *buf, int count)
>
> ret = i2c_transfer(adap, &msg, 1);
>
> - /* If everything went ok (i.e. 1 msg transmitted), return #bytes
> - transmitted, else error code. */
> + /*
> + * If everything went ok (i.e. 1 msg received), return #bytes received,
> + * else error code.
> + */
> return (ret == 1) ? count : ret;
> }
> EXPORT_SYMBOL(i2c_master_recv);
Applied, thanks.
--
Jean Delvare
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-26 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 19:59 [PATCH] i2c: core: comment says "transmitted" but means "received" Wolfram Sang
[not found] ` <1327521565-14988-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-01-26 8:02 ` Jean Delvare
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.