Re: [PATCH net-next 2/7] net: bluetooth: compact struct bt_skb_cb by converting boolean fields to bit fields
From: Shmulik Ladkani <hidden>
Date: 2015-02-26 07:30:48
From: Shmulik Ladkani <hidden>
Date: 2015-02-26 07:30:48
On Thu, 26 Feb 2015 04:10:07 +0200 Eyal Birger [off-list ref] wrote:
@@ -277,11 +277,11 @@ typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode); struct bt_skb_cb { __u8 pkt_type; - __u8 incoming; __u16 opcode; __u16 expect; - __u8 force_active; - bool req_start; + __u8 force_active:1; + __u8 incoming:1; + __u8 req_start:1; u8 req_event; hci_req_complete_t req_complete; struct l2cap_chan *chan;
There's a:
bt_cb(skb)->force_active = BT_POWER_FORCE_ACTIVE_ON;
assignment in l2cap_core.c.
No bluetooth expert, no idea if BT_POWER_FORCE_ACTIVE_ON is 1 by definition.
If not, maybe prefer:
bt_cb(skb)->force_active = !!BT_POWER_FORCE_ACTIVE_ON
Besides that,
Reviewed-by: Shmulik Ladkani <redacted>