* Resend: [PATCH] Bluetooth: Fix Endian Bug.
@ 2012-03-01 10:59 santosh nayak
2012-03-01 12:35 ` Andrei Emeltchenko
0 siblings, 1 reply; 10+ messages in thread
From: santosh nayak @ 2012-03-01 10:59 UTC (permalink / raw)
To: marcel
Cc: padovan, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors, Santosh Nayak
From: Santosh Nayak <santoshprasadnayak@gmail.com>
Fix for endian bug.
Fix for null dereferenced removed as it is already
submitted by Andrei.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
net/bluetooth/l2cap_sock.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 401d942..86d5067 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
}
if (la.l2_cid)
- err = l2cap_add_scid(chan, la.l2_cid);
+ err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
else
err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm);
@@ -123,7 +123,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
if (la.l2_cid && la.l2_psm)
return -EINVAL;
- err = l2cap_chan_connect(chan, la.l2_psm, la.l2_cid, &la.l2_bdaddr);
+ err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
+ &la.l2_bdaddr);
if (err)
goto done;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-01 10:59 santosh nayak
@ 2012-03-01 12:35 ` Andrei Emeltchenko
2012-03-01 14:04 ` santosh prasad nayak
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-03-01 12:35 UTC (permalink / raw)
To: santosh nayak
Cc: marcel, padovan, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors
Hi Santosh,
On Thu, Mar 01, 2012 at 04:29:21PM +0530, santosh nayak wrote:
> From: Santosh Nayak <santoshprasadnayak@gmail.com>
>
> Fix for endian bug.
>
> Fix for null dereferenced removed as it is already
> submitted by Andrei.
>
> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
> ---
> net/bluetooth/l2cap_sock.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
We prefer following commit log (this is the example)
<------8<----------------------------------------------------------
| From: Santosh Nayak <santoshprasadnayak@gmail.com>
|
| Fix network to host endian conversion for L2CAP chan id.
|
| Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
|
| ---
| * v2 Fix for null dereferenced removed as it is already
| submitted by Andrei.
|
| net/bluetooth/l2cap_sock.c | 5 +++--
| 1 files changed, 3 insertions(+), 2 deletions(-)
|
<------8<----------------------------------------------------------
>
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index 401d942..86d5067 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
> }
>
> if (la.l2_cid)
> - err = l2cap_add_scid(chan, la.l2_cid);
> + err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
> else
> err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm);
>
> @@ -123,7 +123,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
> if (la.l2_cid && la.l2_psm)
> return -EINVAL;
>
> - err = l2cap_chan_connect(chan, la.l2_psm, la.l2_cid, &la.l2_bdaddr);
> + err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
> + &la.l2_bdaddr);
I live this to Marcel to decide should we reindent our code otherwise this
one looks odd.
Best regards
Andrei Emeltchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-01 12:35 ` Andrei Emeltchenko
@ 2012-03-01 14:04 ` santosh prasad nayak
2012-03-02 12:32 ` Andrei Emeltchenko
0 siblings, 1 reply; 10+ messages in thread
From: santosh prasad nayak @ 2012-03-01 14:04 UTC (permalink / raw)
To: Andrei Emeltchenko, santosh nayak, marcel, padovan, davem,
linux-bluetooth, netdev, linux-kernel, kernel-janitors
Andrei,
I could not get you.
Do you want me to resend the patch with subject,
"[PATCH] Bluetooth: Fix network to host endian conversion for L2CAP
chan id." ?
regards
santosh
On Thu, Mar 1, 2012 at 6:05 PM, Andrei Emeltchenko
<andrei.emeltchenko.news@gmail.com> wrote:
> Hi Santosh,
>
> On Thu, Mar 01, 2012 at 04:29:21PM +0530, santosh nayak wrote:
>> From: Santosh Nayak <santoshprasadnayak@gmail.com>
>>
>> Fix for endian bug.
>>
>> Fix for null dereferenced removed as it is already
>> submitted by Andrei.
>>
>> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
>> ---
>> net/bluetooth/l2cap_sock.c | 5 +++--
>> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> We prefer following commit log (this is the example)
>
> <------8<----------------------------------------------------------
> | From: Santosh Nayak <santoshprasadnayak@gmail.com>
> |
> | Fix network to host endian conversion for L2CAP chan id.
> |
> | Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
> |
> | ---
> | * v2 Fix for null dereferenced removed as it is already
> | submitted by Andrei.
> |
> | net/bluetooth/l2cap_sock.c | 5 +++--
> | 1 files changed, 3 insertions(+), 2 deletions(-)
> |
> <------8<----------------------------------------------------------
>
>
>>
>> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
>> index 401d942..86d5067 100644
>> --- a/net/bluetooth/l2cap_sock.c
>> +++ b/net/bluetooth/l2cap_sock.c
>> @@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
>> }
>>
>> if (la.l2_cid)
>> - err = l2cap_add_scid(chan, la.l2_cid);
>> + err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
>> else
>> err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm);
>>
>> @@ -123,7 +123,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
>> if (la.l2_cid && la.l2_psm)
>> return -EINVAL;
>>
>> - err = l2cap_chan_connect(chan, la.l2_psm, la.l2_cid, &la.l2_bdaddr);
>> + err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
>> + &la.l2_bdaddr);
>
> I live this to Marcel to decide should we reindent our code otherwise this
> one looks odd.
>
> Best regards
> Andrei Emeltchenko
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Resend: [PATCH] Bluetooth: Fix Endian Bug.
@ 2012-03-01 17:16 santosh nayak
2012-03-02 7:44 ` Dan Carpenter
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: santosh nayak @ 2012-03-01 17:16 UTC (permalink / raw)
To: marcel
Cc: padovan, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors, Santosh Nayak
From: Santosh Nayak <santoshprasadnayak@gmail.com>
Fix network to host endian conversion for L2CAP chan id.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
net/bluetooth/l2cap_sock.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 401d942..86d5067 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
}
if (la.l2_cid)
- err = l2cap_add_scid(chan, la.l2_cid);
+ err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
else
err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm);
@@ -123,7 +123,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
if (la.l2_cid && la.l2_psm)
return -EINVAL;
- err = l2cap_chan_connect(chan, la.l2_psm, la.l2_cid, &la.l2_bdaddr);
+ err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
+ &la.l2_bdaddr);
if (err)
goto done;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-01 17:16 Resend: [PATCH] Bluetooth: Fix Endian Bug santosh nayak
@ 2012-03-02 7:44 ` Dan Carpenter
2012-03-08 5:33 ` Gustavo Padovan
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2012-03-02 7:44 UTC (permalink / raw)
To: santosh nayak
Cc: marcel, padovan, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
When you put "Resend:" in the subject it breaks git am. Git am is
supposed to strip out the [PATCH] but the Resend confuses it.
Put the subject as:
[PATCH v3] Bluetooth: Fix Endian Bug.
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-01 14:04 ` santosh prasad nayak
@ 2012-03-02 12:32 ` Andrei Emeltchenko
0 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-03-02 12:32 UTC (permalink / raw)
To: santosh prasad nayak
Cc: marcel, padovan, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors
Hi Santosh,
On Thu, Mar 01, 2012 at 07:34:58PM +0530, santosh prasad nayak wrote:
> Andrei,
>
> I could not get you.
>
> Do you want me to resend the patch with subject,
> "[PATCH] Bluetooth: Fix network to host endian conversion for L2CAP
> chan id." ?
No, the main concern was your commit message which is changelog and should
come after "---" as it is shown in the example below.
> > On Thu, Mar 01, 2012 at 04:29:21PM +0530, santosh nayak wrote:
> >> From: Santosh Nayak <santoshprasadnayak@gmail.com>
> >>
> >> Fix for endian bug.
> >>
> >> Fix for null dereferenced removed as it is already
> >> submitted by Andrei.
> >>
> >> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
> >> ---
> >> net/bluetooth/l2cap_sock.c | 5 +++--
> >> 1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > We prefer following commit log (this is the example)
> >
> > <------8<----------------------------------------------------------
> > | From: Santosh Nayak <santoshprasadnayak@gmail.com>
> > |
> > | Fix network to host endian conversion for L2CAP chan id.
> > |
> > | Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
> > |
> > | ---
> > | * v2 Fix for null dereferenced removed as it is already
> > | submitted by Andrei.
> > |
> > | net/bluetooth/l2cap_sock.c | 5 +++--
> > | 1 files changed, 3 insertions(+), 2 deletions(-)
> > |
> > <------8<----------------------------------------------------------
Best regards
Andrei Emeltchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-01 17:16 Resend: [PATCH] Bluetooth: Fix Endian Bug santosh nayak
2012-03-02 7:44 ` Dan Carpenter
@ 2012-03-08 5:33 ` Gustavo Padovan
2012-03-08 17:53 ` Marcel Holtmann
2012-03-09 12:21 ` Andrei Emeltchenko
2012-03-09 12:45 ` Gustavo Padovan
3 siblings, 1 reply; 10+ messages in thread
From: Gustavo Padovan @ 2012-03-08 5:33 UTC (permalink / raw)
To: santosh nayak
Cc: marcel, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors
Hi Santosh,
* santosh nayak <santoshprasadnayak@gmail.com> [2012-03-01 22:46:36 +0530]:
> From: Santosh Nayak <santoshprasadnayak@gmail.com>
>
> Fix network to host endian conversion for L2CAP chan id.
>
> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
> ---
> net/bluetooth/l2cap_sock.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index 401d942..86d5067 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
> }
>
> if (la.l2_cid)
> - err = l2cap_add_scid(chan, la.l2_cid);
> + err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
This is kind weird, la.l2_cid comes from the user, so it is already in host
endian. No need for convertions here.
Gustavo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-08 5:33 ` Gustavo Padovan
@ 2012-03-08 17:53 ` Marcel Holtmann
0 siblings, 0 replies; 10+ messages in thread
From: Marcel Holtmann @ 2012-03-08 17:53 UTC (permalink / raw)
To: Gustavo Padovan
Cc: santosh nayak, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors
Hi Gustavo,
> > Fix network to host endian conversion for L2CAP chan id.
> >
> > Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
> > ---
> > net/bluetooth/l2cap_sock.c | 5 +++--
> > 1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> > index 401d942..86d5067 100644
> > --- a/net/bluetooth/l2cap_sock.c
> > +++ b/net/bluetooth/l2cap_sock.c
> > @@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
> > }
> >
> > if (la.l2_cid)
> > - err = l2cap_add_scid(chan, la.l2_cid);
> > + err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
>
> This is kind weird, la.l2_cid comes from the user, so it is already in host
> endian. No need for convertions here.
CID and PSM are provided in little endian by user space.
Regards
Marcel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-01 17:16 Resend: [PATCH] Bluetooth: Fix Endian Bug santosh nayak
2012-03-02 7:44 ` Dan Carpenter
2012-03-08 5:33 ` Gustavo Padovan
@ 2012-03-09 12:21 ` Andrei Emeltchenko
2012-03-09 12:45 ` Gustavo Padovan
3 siblings, 0 replies; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-03-09 12:21 UTC (permalink / raw)
To: santosh nayak
Cc: marcel, padovan, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors
On Thu, Mar 01, 2012 at 10:46:36PM +0530, santosh nayak wrote:
> From: Santosh Nayak <santoshprasadnayak@gmail.com>
>
> Fix network to host endian conversion for L2CAP chan id.
>
> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> net/bluetooth/l2cap_sock.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index 401d942..86d5067 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -82,7 +82,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
> }
>
> if (la.l2_cid)
> - err = l2cap_add_scid(chan, la.l2_cid);
> + err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
> else
> err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm);
>
> @@ -123,7 +123,8 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
> if (la.l2_cid && la.l2_psm)
> return -EINVAL;
>
> - err = l2cap_chan_connect(chan, la.l2_psm, la.l2_cid, &la.l2_bdaddr);
> + err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
> + &la.l2_bdaddr);
> if (err)
> goto done;
>
> --
> 1.7.4.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Resend: [PATCH] Bluetooth: Fix Endian Bug.
2012-03-01 17:16 Resend: [PATCH] Bluetooth: Fix Endian Bug santosh nayak
` (2 preceding siblings ...)
2012-03-09 12:21 ` Andrei Emeltchenko
@ 2012-03-09 12:45 ` Gustavo Padovan
3 siblings, 0 replies; 10+ messages in thread
From: Gustavo Padovan @ 2012-03-09 12:45 UTC (permalink / raw)
To: santosh nayak
Cc: marcel, davem, linux-bluetooth, netdev, linux-kernel,
kernel-janitors
Hi Andrei,
* santosh nayak <santoshprasadnayak@gmail.com> [2012-03-01 22:46:36 +0530]:
> From: Santosh Nayak <santoshprasadnayak@gmail.com>
>
> Fix network to host endian conversion for L2CAP chan id.
>
> Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
> ---
> net/bluetooth/l2cap_sock.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
Applied, thanks.
Gustavo
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-03-09 12:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 17:16 Resend: [PATCH] Bluetooth: Fix Endian Bug santosh nayak
2012-03-02 7:44 ` Dan Carpenter
2012-03-08 5:33 ` Gustavo Padovan
2012-03-08 17:53 ` Marcel Holtmann
2012-03-09 12:21 ` Andrei Emeltchenko
2012-03-09 12:45 ` Gustavo Padovan
-- strict thread matches above, loose matches on Subject: below --
2012-03-01 10:59 santosh nayak
2012-03-01 12:35 ` Andrei Emeltchenko
2012-03-01 14:04 ` santosh prasad nayak
2012-03-02 12:32 ` Andrei Emeltchenko
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).