lkml.org 
[lkml]   [2016]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel
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 <pavel@ucw.cz>
> > >
> > > diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> []
> > > struct bt_skb_cb {
> > > - __u8 pkt_type;
> > > - __u8 force_active;
> > > - __u16 expect;
> > > - __u8 incoming:1;
> > > + u8 pkt_type;
> > > + u8 force_active;
> > > + u16 expect;
> > > + u8 incoming:1;
> > > union {
> > > struct l2cap_ctrl l2cap;
> > > struct hci_ctrl hci;
>
> trivia:
>
> It's generally faster to use bool instead of u8 foo:1;

Ok, but I'm not changing that in this patch.

(And actually, bool will take a lot more memory, right?)
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-10-05 21:12    [W:0.086 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site