Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: David Stockwell <dstockwell@frequency-one.com>,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/5] avrcp: get/set three-byte company-id
Date: Fri, 9 Sep 2011 15:46:45 +0300	[thread overview]
Message-ID: <20110909124645.GA26822@dell.ger.corp.intel.com> (raw)
In-Reply-To: <20110909123517.GA26219@dell.ger.corp.intel.com>

Hi,

On Fri, Sep 09, 2011, Johan Hedberg wrote:
> On Fri, Sep 09, 2011, David Stockwell wrote:
> > A short cut: the output is a contiguous array of uint_8, so masking
> > with 0xFF should be unnecessary.  Would this be required for non-x86
> > (including x86_64) architectures?
> 
> Firstly, please don't top-post on this mailing list.
> 
> If you don't do "& 0xff" and the value you're trying to assign to cid[n]
> is greater than 0xff isn't the result of the integer overflow that
> follows essentially the same as if you had done "% (0xff + 1)" (which is
> not what you want in this case).

Actually those two operations result in the same value (I even did a
quick test program for this). So you're right :)

Johan

  reply	other threads:[~2011-09-09 12:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 23:14 [PATCH 0/5] avrcp: fixes and pdu-continuation Lucas De Marchi
2011-09-08 23:14 ` [PATCH 1/5] avrcp: use LAST element on media_info_id enum Lucas De Marchi
2011-09-08 23:14 ` [PATCH 2/5] avrcp: fix handling of metadata item 0x7 Lucas De Marchi
2011-09-08 23:14 ` [PATCH 3/5] avrcp: get/set three-byte company-id Lucas De Marchi
2011-09-09 10:41   ` Johan Hedberg
2011-09-09 12:21     ` David Stockwell
2011-09-09 12:35       ` Johan Hedberg
2011-09-09 12:46         ` Johan Hedberg [this message]
2011-09-09 13:04           ` Lucas De Marchi
2011-09-09 23:19         ` David Stockwell
2011-09-08 23:14 ` [PATCH 4/5] avrcp: limit avrcp packet size to the MTU of AV/C Lucas De Marchi
2011-09-08 23:14 ` [PATCH 5/5] avrcp: implement pdu continuation request and abort Lucas De Marchi

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=20110909124645.GA26822@dell.ger.corp.intel.com \
    --to=johan.hedberg@gmail.com \
    --cc=dstockwell@frequency-one.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    /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