Re: [PATCH v3 4/5] android/hal: Add support for handling pin request event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux