Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 4/5] android/hal: Add support for handling pin request event
Date: Tue, 29 Oct 2013 13:40:31 +0100	[thread overview]
Message-ID: <5039375.pvTmde513Z@uw000953> (raw)
In-Reply-To: <20131029121945.GA1008@x220.p-661hnu-f1>

Hi Johan,

> Hi Szymon,
> 
> On Tue, Oct 29, 2013, Szymon Janc wrote:
> > ---
> >  android/hal-bluetooth.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> 
> I've applied the first three patches in this set, but are you sure the
> following isn't prone to unaligned access issues:
> 
> > +	bt_bdaddr_t *addr = (bt_bdaddr_t *) ev->bdaddr;
> > +	bt_bdname_t *name = (bt_bdname_t *) ev->name;
> 
> I.e. wouldn't this be an issue if the expected alignment of bt_bdaddr_t
> and bt_bdname_t pointers is different from the alignment of ev->bdaddr
> and ev->name.

bt_bdaddr_t and bt_bdname_t are declared as packed structures so this is safe.
I'll add comment in v4 as suggested.

-- 
BR
Szymon Janc


  reply	other threads:[~2013-10-29 12:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 11:52 [PATCH v3 0/5] initial code for pairing support Szymon Janc
2013-10-29 11:52 ` [PATCH v3 1/5] android: Define class of device as four bytes in IPC doc Szymon Janc
2013-10-29 11:52 ` [PATCH v3 2/5] android: Update IPC headers to match SSP and PIN requests events Szymon Janc
2013-10-29 11:52 ` [PATCH v3 3/5] android/hal: Add support for handling bond state change event Szymon Janc
2013-10-29 11:52 ` [PATCH v3 4/5] android/hal: Add support for handling pin request event Szymon Janc
2013-10-29 12:19   ` Johan Hedberg
2013-10-29 12:40     ` Szymon Janc [this message]
2013-10-29 11:52 ` [PATCH v3 5/5] android/hal: Add support for handling SSP " Szymon Janc

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=5039375.pvTmde513Z@uw000953 \
    --to=szymon.janc@tieto.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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