* [PATCH] Bluetooth: L2CAP: Fix a condition in l2cap_sock_recvmsg()
@ 2020-03-12 11:33 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-03-12 11:33 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz
Cc: Johan Hedberg, Jakub Kicinski, linux-bluetooth, kernel-janitors
Smatch complains about the indenting:
net/bluetooth/l2cap_sock.c:1027 l2cap_sock_recvmsg()
warn: inconsistent indenting
It looks like this is supposed to be an "else if" condition.
Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
net/bluetooth/l2cap_sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 0c636be3469e..40fb10b591bd 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1024,7 +1024,7 @@ static int l2cap_sock_recvmsg(struct socket *sock, struct msghdr *msg,
sk->sk_state = BT_CONNECTED;
pi->chan->state = BT_CONNECTED;
__l2cap_ecred_conn_rsp_defer(pi->chan);
- } if (bdaddr_type_is_le(pi->chan->src_type)) {
+ } else if (bdaddr_type_is_le(pi->chan->src_type)) {
sk->sk_state = BT_CONNECTED;
pi->chan->state = BT_CONNECTED;
__l2cap_le_connect_rsp_defer(pi->chan);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] Bluetooth: L2CAP: Fix a condition in l2cap_sock_recvmsg()
@ 2020-03-12 11:33 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-03-12 11:33 UTC (permalink / raw)
To: Marcel Holtmann, Luiz Augusto von Dentz
Cc: Johan Hedberg, Jakub Kicinski, linux-bluetooth, kernel-janitors
Smatch complains about the indenting:
net/bluetooth/l2cap_sock.c:1027 l2cap_sock_recvmsg()
warn: inconsistent indenting
It looks like this is supposed to be an "else if" condition.
Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
net/bluetooth/l2cap_sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 0c636be3469e..40fb10b591bd 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1024,7 +1024,7 @@ static int l2cap_sock_recvmsg(struct socket *sock, struct msghdr *msg,
sk->sk_state = BT_CONNECTED;
pi->chan->state = BT_CONNECTED;
__l2cap_ecred_conn_rsp_defer(pi->chan);
- } if (bdaddr_type_is_le(pi->chan->src_type)) {
+ } else if (bdaddr_type_is_le(pi->chan->src_type)) {
sk->sk_state = BT_CONNECTED;
pi->chan->state = BT_CONNECTED;
__l2cap_le_connect_rsp_defer(pi->chan);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Bluetooth: L2CAP: Fix a condition in l2cap_sock_recvmsg()
2020-03-12 11:33 ` Dan Carpenter
@ 2020-03-12 14:12 ` Marcel Holtmann
-1 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2020-03-12 14:12 UTC (permalink / raw)
To: Dan Carpenter
Cc: Luiz Augusto von Dentz, Johan Hedberg, Jakub Kicinski,
Bluez mailing list, kernel-janitors
Hi Dan,
> Smatch complains about the indenting:
>
> net/bluetooth/l2cap_sock.c:1027 l2cap_sock_recvmsg()
> warn: inconsistent indenting
>
> It looks like this is supposed to be an "else if" condition.
>
> Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> net/bluetooth/l2cap_sock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Bluetooth: L2CAP: Fix a condition in l2cap_sock_recvmsg()
@ 2020-03-12 14:12 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2020-03-12 14:12 UTC (permalink / raw)
To: Dan Carpenter
Cc: Luiz Augusto von Dentz, Johan Hedberg, Jakub Kicinski,
Bluez mailing list, kernel-janitors
Hi Dan,
> Smatch complains about the indenting:
>
> net/bluetooth/l2cap_sock.c:1027 l2cap_sock_recvmsg()
> warn: inconsistent indenting
>
> It looks like this is supposed to be an "else if" condition.
>
> Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> net/bluetooth/l2cap_sock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-12 14:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-12 11:33 [PATCH] Bluetooth: L2CAP: Fix a condition in l2cap_sock_recvmsg() Dan Carpenter
2020-03-12 11:33 ` Dan Carpenter
2020-03-12 14:12 ` Marcel Holtmann
2020-03-12 14: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.