All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] bluetooth:using 8bits for the hci cmsg state flags
@ 2020-06-11 14:26 Alain Michaud
  2020-06-12 13:12 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Alain Michaud @ 2020-06-11 14:26 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Alain Michaud

This change implements suggestions from the code review of the sco cmsg
state flag patch.

Signed-off-by: Alain Michaud <alainm@chromium.org>
---

 include/net/bluetooth/hci_sock.h | 4 ++--
 net/bluetooth/hci_sock.c         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/net/bluetooth/hci_sock.h b/include/net/bluetooth/hci_sock.h
index 9352bb1bf34c..9949870f7d78 100644
--- a/include/net/bluetooth/hci_sock.h
+++ b/include/net/bluetooth/hci_sock.h
@@ -31,8 +31,8 @@
 #define HCI_TIME_STAMP	3
 
 /* CMSG flags */
-#define HCI_CMSG_DIR	0x0001
-#define HCI_CMSG_TSTAMP	0x0002
+#define HCI_CMSG_DIR	0x01
+#define HCI_CMSG_TSTAMP	0x02
 
 struct sockaddr_hci {
 	sa_family_t    hci_family;
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index caf38a8ea6a8..d5627967fc25 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -52,7 +52,7 @@ struct hci_pinfo {
 	struct bt_sock    bt;
 	struct hci_dev    *hdev;
 	struct hci_filter filter;
-	__u32             cmsg_mask;
+	__u8              cmsg_mask;
 	unsigned short    channel;
 	unsigned long     flags;
 	__u32             cookie;
@@ -1399,7 +1399,7 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr,
 static void hci_sock_cmsg(struct sock *sk, struct msghdr *msg,
 			  struct sk_buff *skb)
 {
-	__u32 mask = hci_pi(sk)->cmsg_mask;
+	__u8 mask = hci_pi(sk)->cmsg_mask;
 
 	if (mask & HCI_CMSG_DIR) {
 		int incoming = bt_cb(skb)->incoming;
-- 
2.27.0.290.gba653c62da-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] bluetooth:using 8bits for the hci cmsg state flags
  2020-06-11 14:26 [PATCH v1] bluetooth:using 8bits for the hci cmsg state flags Alain Michaud
@ 2020-06-12 13:12 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2020-06-12 13:12 UTC (permalink / raw)
  To: Alain Michaud; +Cc: linux-bluetooth

Hi Alain,

> This change implements suggestions from the code review of the sco cmsg
> state flag patch.
> 
> Signed-off-by: Alain Michaud <alainm@chromium.org>
> ---
> 
> include/net/bluetooth/hci_sock.h | 4 ++--
> net/bluetooth/hci_sock.c         | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-12 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 14:26 [PATCH v1] bluetooth:using 8bits for the hci cmsg state flags Alain Michaud
2020-06-12 13:12 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.