[PATCH] Bluetooth: Convert error codes to le16

Subsystems: bluetooth subsystem, the rest

STALE5306d

2 messages, 2 authors, 2012-03-09 · open the first message on its own page

[PATCH] Bluetooth: Convert error codes to le16

From: Andrei Emeltchenko <hidden>
Date: 2012-03-09 14:07:17

From: Andrei Emeltchenko <redacted>

Create Chan Rsp shall put result and status in le format.

Signed-off-by: Andrei Emeltchenko <redacted>
---
 net/bluetooth/l2cap_core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 428e0b0..cf0b166 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -3300,8 +3300,8 @@ static inline int l2cap_create_channel_req(struct l2cap_conn *conn,
 	/* Placeholder: Always reject */
 	rsp.dcid = 0;
 	rsp.scid = cpu_to_le16(scid);
-	rsp.result = L2CAP_CR_NO_MEM;
-	rsp.status = L2CAP_CS_NO_INFO;
+	rsp.result = cpu_to_le16(L2CAP_CR_NO_MEM);
+	rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO);
 
 	l2cap_send_cmd(conn, cmd->ident, L2CAP_CREATE_CHAN_RSP,
 		       sizeof(rsp), &rsp);
-- 
1.7.9

Re: [PATCH] Bluetooth: Convert error codes to le16

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-03-09 17:09:53

Hi Andrei,
quoted hunk
Create Chan Rsp shall put result and status in le format.

Signed-off-by: Andrei Emeltchenko <redacted>
---
 net/bluetooth/l2cap_core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 428e0b0..cf0b166 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -3300,8 +3300,8 @@ static inline int l2cap_create_channel_req(struct l2cap_conn *conn,
 	/* Placeholder: Always reject */
 	rsp.dcid = 0;
 	rsp.scid = cpu_to_le16(scid);
-	rsp.result = L2CAP_CR_NO_MEM;
-	rsp.status = L2CAP_CS_NO_INFO;
+	rsp.result = cpu_to_le16(L2CAP_CR_NO_MEM);
+	rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO);
you can use the __constant version of the macro here.

Regards

Marcel

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help