Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-06 Thread Joe Perches
On Thu, 2016-10-06 at 13:00 +, David Laight wrote: > From: Joe Perches > > Sent: 06 October 2016 12:39 > > On Thu, 2016-10-06 at 09:41 +, David Laight wrote: > > > From: Joe Perches > > > > No worries, and bool is the same ,size as u8. > > > That is not guaranteed at all. > > > One of the A

RE: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-06 Thread David Laight
From: Joe Perches > Sent: 06 October 2016 12:39 > On Thu, 2016-10-06 at 09:41 +, David Laight wrote: > > From: Joe Perches > > > No worries, and bool is the same ,size as u8. > > That is not guaranteed at all. > > One of the ARM ABI defined bool to be the size of int. > > Really? What kernel

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-06 Thread Joe Perches
On Thu, 2016-10-06 at 09:41 +, David Laight wrote: > From: Joe Perches > > No worries, and bool is the same ,size as u8. > That is not guaranteed at all. > One of the ARM ABI defined bool to be the size of int. Really? What kernel has sizeof(_Bool) != 1 ?

RE: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-06 Thread David Laight
From: Of Joe Perches ... > No worries, and bool is the same size as u8. That is not guaranteed at all. One of the ARM ABI defined bool to be the size of int. David

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-06 Thread Johan Hedberg
Hi, On Thu, Oct 06, 2016, Joe Perches wrote: > On Thu, 2016-10-06 at 09:02 +0200, Pavel Machek wrote: > > I believe you are wrong. bit addressability does not matter, cpu can > > definitely get the bit values. > > > > u8 foo:1; > > u8 bar:1; > > u8 baz:1; > > > > should take 1 byte, where > > >

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-06 Thread Joe Perches
On Thu, 2016-10-06 at 09:02 +0200, Pavel Machek wrote: > I believe you are wrong. bit addressability does not matter, cpu can > definitely get the bit values. > > u8 foo:1; > u8 bar:1; > u8 baz:1; > > should take 1 byte, where > > bool foo, bar, baz; > > will take more like 3. Definitely true.

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-06 Thread Pavel Machek
On Wed 2016-10-05 15:28:51, Joe Perches wrote: > On Thu, 2016-10-06 at 00:13 +0200, Pavel Machek wrote: > > On Wed 2016-10-05 12:15:34, Joe Perches wrote: > > > On Wed, 2016-10-05 at 21:11 +0200, Pavel Machek wrote: > > > > On Wed 2016-10-05 10:53:16, Joe Perches wrote: > [] > > > > > trivia: > > >

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-05 Thread Joe Perches
On Thu, 2016-10-06 at 00:13 +0200, Pavel Machek wrote: > On Wed 2016-10-05 12:15:34, Joe Perches wrote: > > On Wed, 2016-10-05 at 21:11 +0200, Pavel Machek wrote: > > > On Wed 2016-10-05 10:53:16, Joe Perches wrote: [] > > > > trivia: > > > > It's generally faster to use bool instead of u8 foo:1; >

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-05 Thread Pavel Machek
On Wed 2016-10-05 12:15:34, Joe Perches wrote: > On Wed, 2016-10-05 at 21:11 +0200, Pavel Machek wrote: > > On Wed 2016-10-05 10:53:16, Joe Perches wrote: > > > On Wed, 2016-10-05 at 13:14 +0200, Marcel Holtmann wrote: > > > > Hi Pavel, > > > > > > > > > bluetooth.h is not part of user API, so __

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-05 Thread Joe Perches
On Wed, 2016-10-05 at 21:11 +0200, Pavel Machek wrote: > On Wed 2016-10-05 10:53:16, Joe Perches wrote: > > On Wed, 2016-10-05 at 13:14 +0200, Marcel Holtmann wrote: > > > Hi Pavel, > > > > > > > bluetooth.h is not part of user API, so __ variants are not neccessary > > > > here. > > > > > > > >

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-05 Thread Pavel Machek
On Wed 2016-10-05 10:53:16, Joe Perches wrote: > On Wed, 2016-10-05 at 13:14 +0200, Marcel Holtmann wrote: > > Hi Pavel, > > > > > bluetooth.h is not part of user API, so __ variants are not neccessary > > > here. > > > > > > Signed-off-by: Pavel Machek > > > > > > diff --git a/include/net/blue

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-05 Thread Joe Perches
On Wed, 2016-10-05 at 13:14 +0200, Marcel Holtmann wrote: > Hi Pavel, > > > bluetooth.h is not part of user API, so __ variants are not neccessary > > here. > > > > Signed-off-by: Pavel Machek > > > > diff --git a/include/net/bluetooth/bluetooth.h > > b/include/net/bluetooth/bluetooth.h [] > >

Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-05 Thread Marcel Holtmann
Hi Pavel, > bluetooth.h is not part of user API, so __ variants are not neccessary > here. > > Signed-off-by: Pavel Machek > > diff --git a/include/net/bluetooth/bluetooth.h > b/include/net/bluetooth/bluetooth.h > index bfd1590..aea0371 100644 > --- a/include/net/bluetooth/bluetooth.h > +++ b/

[PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel

2016-10-03 Thread Pavel Machek
bluetooth.h is not part of user API, so __ variants are not neccessary here. Signed-off-by: Pavel Machek diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index bfd1590..aea0371 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetoot