From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752072AbbJEX3m (ORCPT ); Mon, 5 Oct 2015 19:29:42 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:59847 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbbJEX3k (ORCPT ); Mon, 5 Oct 2015 19:29:40 -0400 From: Felipe Balbi To: Vaishali Thakkar , David Laight CC: Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] usb: gadget: f_uac1: Convert use of __constant_cpu_to_le16 to cpu_to_le16 In-Reply-To: References: <20150819053122.GA11573@localhost> <063D6719AE5E284EB5DD2968C1650D6D1CB804E2@AcuExch.aculab.com> <063D6719AE5E284EB5DD2968C1650D6D1CB822B8@AcuExch.aculab.com> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 5 Oct 2015 18:29:26 -0500 Message-ID: <871td8gai1.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Vaishali Thakkar writes: > On Mon, Aug 24, 2015 at 2:29 PM, David Laight w= rote: >> From: Vaishali Thakkar [mailto:vthakkar1994@gmail.com] >>> Sent: 22 August 2015 02:57 >> ... >>> >> - .bcdADC =3D __constant_cpu_to_le16(0x0100), >>> >> - .wTotalLength =3D __constant_cpu_to_le16(UAC_DT_TOTAL_= LENGTH), >>> >> + .bcdADC =3D cpu_to_le16(0x0100), >>> >> + .wTotalLength =3D cpu_to_le16(UAC_DT_TOTAL_LENGTH), >>> > >>> > Have you test compiled this on a big-endian system? >>> > My gut feeling is that is fails. >>> >>> No. I have tested it on little-endian system only. But I'll >>> be really surprised if this will fail. Can you please tell me >>> if I am missing something in this particular case or same >>> applies for other cases because most of the cases like >>> __constant_ are already converted to ? >>> >>> As far as I know, if the argument is a constant the >>> conversion happens at compile time. And unfolding both >>> definitions returns to same expression. Still I am trying if >>> someone can test it for me on big endian system. >> >> Flip one to cpu_to_be16() and see if it still compiles. > > Yes. It still compiles. it's unclear to me if this is really safe to apply. Until then I'm dropping this from queue. Seems like, at a minimum, we need a better commit log =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWEwfXAAoJEIaOsuA1yqREQksP/j2NikWNT2Xl0XxE+MCVrzRa fq6tp7I1k0X7x2X3FVb4WHtpnI42QtzIraDChRDXLivGunZHN0y9f77LMbar/95n d8tvxg3nG+u2qJNkapMTMmypBxrmtQrloioBMXmPyTp1pNokLWsi/rJeLp/1ffal ml3cBfWs/8HwtvsJ1IV4tZ30UxRlVulbDGCZnpgd730AMkNUT64HE4sQIUAWEmTw NYOx08Nh4rk6WIhq1y4YYcVer0M3iWJ3gN1wQi+IIKfnm3mNuPQT2AE5YY2HycOW 7iU/02//eSTXQTLtqi1OfpEgo4HPBFHkLGFmi+1hVrRmG6k5Ud8LMvFzlrpf6ji8 GdG/GWGf4M0WWAa7M0ZocMhwhrQ1ICHg08kii+pbK9RwKtqAfvBMXPw7PhYuFpBo vPvUIok+2331OC9qKIU0qng54/KQ3PplLj3pMZkbip+mW2493bOqFRF31mxMi08g Lw5J6JJGd91qxetxpK8116Ok3sKr9RJU/l96TJJplesTMuNpzl/6Bzjjkr8K7xpq eYp177Qr1NjJTap03ZRUkmqVpWM9iiB2tSiGFDia/z1HctjaWgp/bTfBL+put9M4 Gn3W/Gmn8RtRqizh6auc3LqaawHmo/Gql+zChmXdASz5N3rCFlwdA261Tv67oizH ZLt1Z88L7ozBdj+9Z5dj =u6kE -----END PGP SIGNATURE----- --=-=-=--