From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 1/4] drm/dsi: Make mipi_dsi_dcs_write() return ssize_t Date: Wed, 23 Jul 2014 09:27:45 +0200 Message-ID: <20140723072743.GD15759@ulmo.nvidia.com> References: <1406013141-18552-1-git-send-email-thierry.reding@gmail.com> <53CE12A7.1010403@samsung.com> <53CE33F7.6020204@samsung.com> <53CE3785.5080407@samsung.com> <53CE3B8B.3000503@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0565459213==" Return-path: Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by gabe.freedesktop.org (Postfix) with ESMTP id EDD786E030 for ; Wed, 23 Jul 2014 00:27:49 -0700 (PDT) Received: by mail-pd0-f171.google.com with SMTP id z10so1114432pdj.2 for ; Wed, 23 Jul 2014 00:27:49 -0700 (PDT) In-Reply-To: <53CE3B8B.3000503@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Andrzej Hajda Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0565459213== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZJcv+A0YCCLh2VIg" Content-Disposition: inline --ZJcv+A0YCCLh2VIg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 22, 2014 at 12:23:07PM +0200, Andrzej Hajda wrote: > Hi Thierry, >=20 > YoungJun's comment refreshed my memory about mipi_dsi_dcs_write return > value. It should be rather int than ssize_t. Why? > .transfer() returns the number of read bytes or error, but in case > of dcs write no bytes are read, so it in fact returns error or 0. > This is why return value was implemented originally as int. > So I do not think this patch is necessary. I think it should return the number of bytes written or an error. That way we give callers the maximum amount of information. They may still choose to only handle < 0 for convenience, but at least the information will be there should it become required at some point. Thierry --ZJcv+A0YCCLh2VIg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTz2PvAAoJEN0jrNd/PrOh7dQP/0M6OEojLzgFOIFN+AeydzEW F88u6/iG7MqDhmEg2+UgResV+GA+x9LjdGVjDiX9agHfB3OUcbj0lDYFQK7Xzvkr O6req0AsA9I0UtXhDpb9L4i6SUXQuGCW8eJ4XR186Jbjmu+7Muk8iZqg/BlNUGsv T4BzEwIo+4ca8yo2FqTS5lj/9dEyslyP5sSL7kuhGTr/qeBgjeJLZOxnpxuC5XTv e2vqI+zzqg3Whi6K+uhz6TB+NrMn1/c06Xiok5Cel1wxbye1dKNtGp8iFGfhftY+ Qyw2SdyRyBACnBSFhViyIi67IyPSZ0OuBC569mwexJUTDi/tiHTQANHCIRZsCQC5 0JwdytyoIwRjbh2t2uQ8Gxj5lYxubZlyNcItsbCVFKbMcHizS4C3mQcD71cKjrR9 lfTQBB0oxK5SLrdsWJ+vfiej3cOAyLcpkDNj+wrM+Bc/1sFpHghwCaFe8eOSSsPW mw1iRKmwsz2bYOZ0qlKh9GED/EEI/DC13n90D8uonXIyawlbUAaWSABdyiqREsOu TO6yu8puF5rPX7Dm26i2eYSBVwXl3ufCLoghUTyw2b56sc4pzuzxkutLLMF2/MiO AELbF6p13xMxkUL4SiJboHU3Sq+Qgyqa9+6rLnXPzgqQ4JTEJtn5F+ZI6jcwKqM9 TsZto6pp3nizeEsaHI5K =3uWy -----END PGP SIGNATURE----- --ZJcv+A0YCCLh2VIg-- --===============0565459213== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0565459213==--