linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lei YU <mine260309@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Lei YU <mine260309@gmail.com>
Subject: [PATCH v2] docs: i2c: Fix return value of i2c_smbus_xxx functions
Date: Tue, 19 Nov 2019 19:23:52 +0800	[thread overview]
Message-ID: <1574162632-65848-1-git-send-email-mine260309@gmail.com> (raw)

In i2c/dev-interface.rst it said

> All these transactions return -1 on failure

But actually the i2c_smbus_xxx functions return negative error numbers
on failure, instead of -1.

Fix the document and remove the following sentence.

Signed-off-by: Lei YU <mine260309@gmail.com>
---
 Documentation/i2c/dev-interface.rst | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/i2c/dev-interface.rst b/Documentation/i2c/dev-interface.rst
index 69c23a3..f2f2b28 100644
--- a/Documentation/i2c/dev-interface.rst
+++ b/Documentation/i2c/dev-interface.rst
@@ -163,11 +163,10 @@ for details) through the following functions::
   __s32 i2c_smbus_write_block_data(int file, __u8 command, __u8 length,
                                    __u8 *values);
 
-All these transactions return -1 on failure; you can read errno to see
-what happened. The 'write' transactions return 0 on success; the
-'read' transactions return the read value, except for read_block, which
-returns the number of values read. The block buffers need not be longer
-than 32 bytes.
+All these transactions return a negative error number on failure.
+The 'write' transactions return 0 on success; the 'read' transactions
+return the read value, except for read_block, which returns the number
+of values read. The block buffers need not be longer than 32 bytes.
 
 The above functions are made available by linking against the libi2c library,
 which is provided by the i2c-tools project.  See:
-- 
2.7.4


             reply	other threads:[~2019-11-19 11:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 11:23 Lei YU [this message]
2019-11-25 14:48 ` [PATCH v2] docs: i2c: Fix return value of i2c_smbus_xxx functions Wolfram Sang
2019-11-26 10:52   ` Jean Delvare
2019-11-27  3:00     ` Lei YU
2020-01-06 13:01     ` Wolfram Sang
2020-01-09 16:39       ` Jean Delvare
2020-01-09 22:15         ` Luca Ceresoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1574162632-65848-1-git-send-email-mine260309@gmail.com \
    --to=mine260309@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).