From: Felipe Balbi <balbi@ti.com>
To: Vaishali Thakkar <vthakkar1994@gmail.com>,
David Laight <David.Laight@aculab.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@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
Date: Mon, 5 Oct 2015 18:29:26 -0500 [thread overview]
Message-ID: <871td8gai1.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <CAK-LDbLvYqj3AdSu-aWryp116u0q7mgaYKn_=h54DV_WrrjAqA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
Vaishali Thakkar <vthakkar1994@gmail.com> writes:
> On Mon, Aug 24, 2015 at 2:29 PM, David Laight <David.Laight@aculab.com> wrote:
>> From: Vaishali Thakkar [mailto:vthakkar1994@gmail.com]
>>> Sent: 22 August 2015 02:57
>> ...
>>> >> - .bcdADC = __constant_cpu_to_le16(0x0100),
>>> >> - .wTotalLength = __constant_cpu_to_le16(UAC_DT_TOTAL_LENGTH),
>>> >> + .bcdADC = cpu_to_le16(0x0100),
>>> >> + .wTotalLength = 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_<foo> are already converted to <foo>?
>>>
>>> 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
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2015-10-05 23:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 5:31 [PATCH] usb: gadget: f_uac1: Convert use of __constant_cpu_to_le16 to cpu_to_le16 Vaishali Thakkar
2015-08-20 10:50 ` David Laight
2015-08-22 1:57 ` Vaishali Thakkar
2015-08-24 8:59 ` David Laight
2015-08-24 10:42 ` Vaishali Thakkar
2015-10-05 23:29 ` Felipe Balbi [this message]
2015-10-06 1:38 ` Vaishali Thakkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871td8gai1.fsf@saruman.tx.rr.com \
--to=balbi@ti.com \
--cc=David.Laight@aculab.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=vthakkar1994@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox