linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Convert error codes to le16
@ 2012-03-09 14:07 Andrei Emeltchenko
  2012-03-09 17:09 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2012-03-09 14:07 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

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

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 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


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

* Re: [PATCH] Bluetooth: Convert error codes to le16
  2012-03-09 14:07 [PATCH] Bluetooth: Convert error codes to le16 Andrei Emeltchenko
@ 2012-03-09 17:09 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2012-03-09 17:09 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

> Create Chan Rsp shall put result and status in le format.
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
>  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



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

end of thread, other threads:[~2012-03-09 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 14:07 [PATCH] Bluetooth: Convert error codes to le16 Andrei Emeltchenko
2012-03-09 17:09 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).