linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: David Laight <David.Laight@ACULAB.COM>
Cc: linux-bluetooth@vger.kernel.org,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@intel.com>,
	linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] bluetooth: opcode field of sent commands is little endian.
Date: Mon, 25 Jun 2012 11:33:11 +0200	[thread overview]
Message-ID: <1340616791.5461.55.camel@thor.local> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6F62@saturn3.aculab.com>

On Mon, 2012-06-25 at 10:20 +0100, David Laight wrote:=20
> > > > Fine with me, though FWIW that not only doesn't use
> > > > __constant_cpu_to_le16() but actually swaps the non-constant value.
> > >=20
> > > Don't see what point you are trying to make here. Swapping the value
> > > from the actual command structure is always fine with me.
> >=20
> > The point is that the result of swapping a constant value is just
> > another constant value, whereas the fix in mainline swaps a value from
> > memory. Not a big deal.
>=20
> Surely, but surely, the definition of cpu_to_le16() uses
> gcc 'magic' to determine that the argument is a constant
> and then automatically selects the 'constant' form.

It can only do that if the argument is constant in the first place
though. :)


--=20
Earthling Michel D=E4nzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer

      reply	other threads:[~2012-06-25  9:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25  6:38 [PATCH] bluetooth: opcode field of sent commands is little endian Michel Dänzer
2012-06-25  6:51 ` Marcel Holtmann
2012-06-25  7:06   ` Michel Dänzer
2012-06-25  7:22     ` Marcel Holtmann
2012-06-25  7:32       ` Michel Dänzer
2012-06-25  8:02         ` Andrei Emeltchenko
2012-06-25  9:20         ` David Laight
2012-06-25  9:33           ` Michel Dänzer [this message]

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=1340616791.5461.55.camel@thor.local \
    --to=michel@daenzer.net \
    --cc=David.Laight@ACULAB.COM \
    --cc=johan.hedberg@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=marcel@holtmann.org \
    /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;
as well as URLs for NNTP newsgroup(s).