Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21454095ybl; Mon, 6 Jan 2020 05:02:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzUzPSOXwUNWgtOGu+1yGNOkyE/F0R0iHW/UhGkRwnjP9+uE2q59iqdDAB59DKgV0Vj1joP X-Received: by 2002:a9d:12f1:: with SMTP id g104mr119179953otg.334.1578315765121; Mon, 06 Jan 2020 05:02:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578315765; cv=none; d=google.com; s=arc-20160816; b=bp2kaCDFRWYX/6OI4kqNsN51kP8gEvdPEucD1w5YKAa8qbbuwV/6mV0quKSv3qneZd pvyyyXAX7pDFF3j2MWOiK0VmE3WlEFF/Hadd4QsU0QTHHTwE/xNPz3WtFAebBvtnuS+i Lgonw1ml57/q/BHg35U+bp4pz/r2WGbHdt7y1H9ShJWl+CR/E3FdesV4t7l37Cw2sFd6 tTnLwTjYABFctYDBcAM2s8BvpGUZ/Nla/kE1fpFygNQMU0DgL5Ajsof91h/1QP8GNPMt EBKk6ZU5Yw+gd4uyxNkIa07Y70zn2VdxcQc/z0dQQhnA77VtJoX5d7jCFeV+RVLZXajM 5tJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=y5bskNOcjaC2iaLkcVLpIMbs1vjnxBHUUfISULkvnDo=; b=r+stYGfmfknQ3hGcQFAPSj0F/C4IBsmiYwLgSapXDMwbVNs2d8Wjw+zNefIm30ps28 ttgmmQLXY5RJq7bZ2PbO/zHZpdh8bsv7QNy8/JQNNzxpYCbf28+mbFkBPUSl7Vio86KO hWTg99fEDBnYhPKXzAliBDLAdl/Anhruo+g6SS2s9zgc6TSRALZaOPneCE2MRZwGAJTE rw9FpwyongK7Cwle7M2V6XNvWzWCbdd3Yk1K1aldxEpozfXjH9H2eT8IB2b6c8d1m5jD 0ggDEo8iZ/buDfxAsiHJEf/DyDOA4y6sFrFJd3ysSXP4Rv7LiTg0nHtt60QdNoPQtJYM 98Mg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m82si32094125oig.129.2020.01.06.05.02.27; Mon, 06 Jan 2020 05:02:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgAFNBO (ORCPT + 99 others); Mon, 6 Jan 2020 08:01:14 -0500 Received: from sauhun.de ([88.99.104.3]:38608 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726080AbgAFNBO (ORCPT ); Mon, 6 Jan 2020 08:01:14 -0500 Received: from localhost (p54B338AC.dip0.t-ipconnect.de [84.179.56.172]) by pokefinder.org (Postfix) with ESMTPSA id BB7592C0686; Mon, 6 Jan 2020 14:01:12 +0100 (CET) Date: Mon, 6 Jan 2020 14:01:09 +0100 From: Wolfram Sang To: Jean Delvare , Luca Ceresoli Cc: Lei YU , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] docs: i2c: Fix return value of i2c_smbus_xxx functions Message-ID: <20200106130056.GA1290@ninjato> References: <1574162632-65848-1-git-send-email-mine260309@gmail.com> <20191125144857.GA2412@kunai> <20191126115243.673fc164@endymion> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6sX45UoQRIJXqkqR" Content-Disposition: inline In-Reply-To: <20191126115243.673fc164@endymion> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6sX45UoQRIJXqkqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > > -All these transactions return -1 on failure; you can read errno to s= ee > > > -what happened. The 'write' transactions return 0 on success; the > > > -'read' transactions return the read value, except for read_block, wh= ich > > > -returns the number of values read. The block buffers need not be lon= ger > > > -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 numb= er > > > +of values read. The block buffers need not be longer than 32 bytes. = =20 > >=20 > > I think the correct solution is to remove this paragraph entirely. > > Because the returned value does not depend on the kernel but on the > > libi2c version. Check this commit from 2012 in the i2c-tools repo: > >=20 > > 330bba2 ("libi2c: Properly propagate real error codes on read errors") > >=20 > > So, I think we should document it there. Jean, what do you think? >=20 > I would go further and move half of the document to i2c-tools. i2c-dev > itself only provides the ioctls. Everything on top of that is in libi2c > now, so the kernel documentation should point to libi2c and the > detailed documentation should come with libi2c. >=20 > So I guess I should review the whole document now to see what needs to > be updated, what should stay, and what should move. Maybe you can collaborate with Luca on this who just revamped a lot of the docs? Putting him on CC and marking this patch as 'Deferred'. --6sX45UoQRIJXqkqR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl4TL5UACgkQFA3kzBSg KbaiNg//cY5iFBrA2+43SMBoEDIkgtFwG+ro0IKYEDqL9pYlSZVkhaFhDpK0J7U7 tmsZzHlfrSAOr7Biq/QuMXRHvDp6kDTKCCIlUdXXT+GhquYIPDyCkwwt4Oa8nT1O 666gN0OCI4ZahsEqNm22RD0E5sDLTZlAUz4DNQY94g95hG36sAeJRj2M+tC9pzaa 4rZp06P+IJ8kqNEFZX13e3z3xsRwAG4wrBWzYrlNWsHkyCblz0svqTHxoAiSN+lX Byv569JFAOkPqEgNSPTeI0j4I7A3o1BIM/kAnqgfkfFHGEKW0nPScZtqQMqe+G4w zJ9tF3oNfBkpBX+4sfDrpIsPEmzEL2MUHDIQhyfwagf1DWVhcKF4OvM5kXDRf6By NBmTkf8eZIwoXTYOqgfBASmsx3cInCcam3aqczp1OxMQdixVqV1Xftdo6p7YCZJV v/+cCc1rZu/SODaWz6uh/wWBKceDmL2RJwft2oe8meYAJrtTRS63XHlJALrTF1vJ jHrKTjtReKUH36fNxNPn4w/0DMcySWlayk3G6R4vAs1eZte27eeyo0bl9z8uEAHi nutigACt9hQpP15kv4gz9ikp8c0sPnlBQ5lLzTvNMBMaJ806kuTQ0dp0UJlR/OR4 KA5hXOBuvhyNXgoDlW3sehBEKEpOIKoabGBG5V2Meg5CzPFoyeA= =Wc1M -----END PGP SIGNATURE----- --6sX45UoQRIJXqkqR--