lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 Oct 2016 21:11:03 +0200
From:   Pavel Machek <pavel@....cz>
To:     Joe Perches <joe@...ches.com>
Cc:     Marcel Holtmann <marcel@...tmann.org>, trivial@...nel.org,
        "Gustavo F. Padovan" <gustavo@...ovan.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [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@....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

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ