Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp278842ybc; Tue, 19 Nov 2019 01:01:08 -0800 (PST) X-Google-Smtp-Source: APXvYqw6F/5VIu6NgGnwlEIOLG0W1RDhQz8+UXiYz4Ft8M8AaW+8OBaT2eubXi6z5/zJVx54YIV5 X-Received: by 2002:a2e:7a04:: with SMTP id v4mr2904379ljc.106.1574154068106; Tue, 19 Nov 2019 01:01:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574154068; cv=none; d=google.com; s=arc-20160816; b=kdMCuTws5c8nY6G8UIet+mOl9IhY61tI1/cNyuBWKMD8p7Bb6Niox3lcrbVk+KEwE/ 1Qr/NVvozLgkM2LHZe/4tggE0/aRwwEit9GA/U4E12UcgLQixqyAKEqVJSrDmS6kU9ZH eszXyUxZqgrkxXKCJFBZdfpA+jTLQU0cYkW57v3wZKE6IuOSnpJywCRxDaN3zBsvvWGd plMjwdChulGyruEqiW1cxDXBm1t+MWZRLrvT6kwhLFkIAwvLjsuAY69aSCu4jlO32Lfb QTcRbjZsjDtyWAGReXTXZ/Cdx1Oknw2ryi03FDNbSprsRXGG5r6lgwlU1x5vBKTzDTVv BRIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3Iq2A2za3LRkXVrjN2ctAH16mhQC1NN0zdxdgyGUSpw=; b=jUEUlMoSfVi80UFSciYj2PMtPMaDPIIjHDJEgOs52wiNCSm8xOWOB1qpRmPyw56/67 nf1RAO+cdtrvn4/kiqVl2t0D5RniCZtFevZFFieXOPiL4EqdnpuEpDsk5YlWOwjebyk+ w2FxbddS8Of8PQnmgAOg3fOE5x/pqqfAkZKhRWnbYk3lMRduk8lKjUKUEdJSlJyj+T37 kC/HYQiRPeGuIHUCzXRJN4sxLOJLLE7T6xWwTXJxQlu5r+ZBxVnK2VyAYRv15NmxlQH7 uRRhZR0er8WciFeDjUmLJrImOz4MLkFWts1rWCT8btR7nTCLbMgCZa7Dp+RFe/RchLRc y2Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QVZqXxIu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si13132232ejm.31.2019.11.19.01.00.42; Tue, 19 Nov 2019 01:01:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QVZqXxIu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727255AbfKSI4u (ORCPT + 99 others); Tue, 19 Nov 2019 03:56:50 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:45027 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725306AbfKSI4t (ORCPT ); Tue, 19 Nov 2019 03:56:49 -0500 Received: by mail-ot1-f68.google.com with SMTP id c19so17161934otr.11; Tue, 19 Nov 2019 00:56:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3Iq2A2za3LRkXVrjN2ctAH16mhQC1NN0zdxdgyGUSpw=; b=QVZqXxIujhcRQBmxlGsAODnAZDBV/wZb3e2f4GxyKxkEsDr3msrq42Zo5s1MIITgwa exjNuLeI5Zz3dBgda+AND+YoFEIbZOw2yVZmofV6tf1YgKrEQFynNXJte1AeKUTy+QYk NpkVjqt0bih3OO689TFWKOz+X/qn3qeImyPbsanweNjSyCUbMTuoC75ZdfCHBG5IopEI 2ukbA1y0LMEi6FyePT+MEQB8xHjFnyr7P3GU6tXRPCmYAbhbTiPm+Na2DNJwPFgBTqfG m1ybl7PDAk67o/DzSKhDUDDUmB6P+6pERReituXTrFWWLrjp5+hZ+G+M9G+evSyfnKS8 XFsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3Iq2A2za3LRkXVrjN2ctAH16mhQC1NN0zdxdgyGUSpw=; b=FSlBRpiG2Eh8tr5nylRYLBJE9ki0oiHS/LvMaL59RBBtm9w7WImom20Kx2Rb4FCLOj TbbkXdBphRfRaSKSL6E0mthw5YssqWBwT/LWloF0CiwzAr0n9SshuckeD8QYJM2exaR1 t+egm4ee+xu6sUYAmsDZ5I9dQvhO4mXesFzMOiyYv0X5kHcM3npKqTxzYJmqy4LLsnyc b8shxVKZvt72FRQ0CDt3Ajmp5ELz7ZDOj0UgJH4qWV3t22JZ9n7kTB9rMHeNCdLYB9hg Hvly8bhAUYM8M+LvVQvuEL59ju9/skuoPzKQnMV2R1ReAKub2MV/heeJ13ibk2vUs/H5 dXUA== X-Gm-Message-State: APjAAAXUVhcRSY1Bpz24NByqhdSdihbKVL7m/1k4h/9zSfOgeljK7O4H GAebKB7YJGKuTBXAs9acUFI= X-Received: by 2002:a9d:6f87:: with SMTP id h7mr2918368otq.216.1574153808967; Tue, 19 Nov 2019 00:56:48 -0800 (PST) Received: from localhost ([32.97.110.55]) by smtp.gmail.com with ESMTPSA id k9sm6955406oik.18.2019.11.19.00.56.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2019 00:56:48 -0800 (PST) From: Lei YU To: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lei YU Subject: [PATCH] docs: i2c: Fix return value of i2c_smbus_xxx functions Date: Tue, 19 Nov 2019 16:56:18 +0800 Message-Id: <1574153778-59977-1-git-send-email-mine260309@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Lei YU --- Documentation/i2c/dev-interface.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/i2c/dev-interface.rst b/Documentation/i2c/dev-interface.rst index 69c23a3..73b77c3 100644 --- a/Documentation/i2c/dev-interface.rst +++ b/Documentation/i2c/dev-interface.rst @@ -163,8 +163,8 @@ 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 +All these transactions return negative value 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. -- 2.7.4