Thread (16 messages) 16 messages, 5 authors, 2016-10-06

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

flat view

From: Joe Perches <joe@perches.com>
Date: 2016-10-05 19:15:40
Also in: lkml, netdev

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

Signed-off-by: Pavel Machek <redacted>
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
[]
quoted
quoted
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?)
No worries, and bool is the same size as u8.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help