From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 03/15] drm/dsi: Add mipi_dsi_set_maximum_return_packet_size() helper Date: Tue, 14 Oct 2014 11:31:14 +0200 Message-ID: <20141014093112.GC18993@ulmo> References: <1413195395-3355-1-git-send-email-thierry.reding@gmail.com> <1413195395-3355-3-git-send-email-thierry.reding@gmail.com> <543BE06F.6060002@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0790456217==" Return-path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 68DBE891E3 for ; Tue, 14 Oct 2014 02:31:17 -0700 (PDT) Received: by mail-wi0-f173.google.com with SMTP id fb4so9537636wid.12 for ; Tue, 14 Oct 2014 02:31:16 -0700 (PDT) In-Reply-To: <543BE06F.6060002@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 --===============0790456217== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uXxzq0nDebZQVNAZ" Content-Disposition: inline --uXxzq0nDebZQVNAZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 13, 2014 at 04:23:43PM +0200, Andrzej Hajda wrote: > On 10/13/2014 12:16 PM, Thierry Reding wrote: > > +int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *ds= i, > > + u16 value) > > +{ > > + u8 tx[2] =3D { value & 0xff, value >> 8 }; > > + struct mipi_dsi_msg msg; > > + ssize_t err; > > + > > + memset(&msg, 0, sizeof(msg)); > > + msg.channel =3D dsi->channel; > > + msg.type =3D MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE; > > + msg.tx_len =3D sizeof(tx); > > + msg.tx_buf =3D tx; >=20 > One more thing, why do not use initializer: > struct mipi_dsi_msg msg =3D { > .channel =3D dsi->channel, > .type =3D MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, > .tx_len =3D sizeof(tx), > .tx_buf =3D tx > }; Personal preference, that's all. Thierry --uXxzq0nDebZQVNAZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUPO1gAAoJEN0jrNd/PrOhdFoQAItn3xi2fFtDJb7Kiu4qPM1s vYi7TYt06kQoYmqDcd9fS+tYRnSeLBWjKbcDV1QNGXX9oLCy1AsR4TrNMrsBrXMR CDCmT/DqqdUkhXlx7rJACW4I8FtTBUlqhvEjKjNtpOIw2wqwLIZufec2D/GcfHKQ 27Ux9U8KuLEywQDTNrulEVEt6udUrFlV1dDmbzn3d9eG86OKby3eAzMzRleB9QJZ +Jb2e9449SgheNd9O13FHTtZ0XjhvLfyyJXQ+SZdxCsDH6d2mgL9yDcROkzrj6nl 90a4LgNcuBLfRpIY5TZ7qMwUzuy/Fp05IDkWdq5MOsDN8P1Q/B+hWNNEjg5QQPga njQPWCQ7q5ThRLRcBnui5h7ghv0l6HnfDB6yxalf+zyBDObp8pdYrqcy/OxaDA8D Ysgv6hCnEaoHBmt3yhIXukIioqxxxKpfEgqvGbsknvQRvVXpzm5pQYdtRPeXCsql L6G8ng8rsBbL1JAuZHUbfM0LgytFi0HcrttgERc1ziykDH3RAjiNvZlTt200H/nV yO7w5MJ5RcEQ+/0Zhs1BbRAr5RxVDfjnd4rUapDEvVE5Pvo4MH3uhqPQKRQDP106 gXrPUd9NVHoJ3c/iaNnotaugITARflYo1jpozZft0GN3Pdq4Q8lDOX+bYQBooRYH 6fDiAaIFvJQJp0ipuhWK =kl1V -----END PGP SIGNATURE----- --uXxzq0nDebZQVNAZ-- --===============0790456217== 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 --===============0790456217==--