Bluetooth: Add missing 6lowpan.h include
Subsystems (2)
PATCH 1/2 Bluetooth: Add missing 6lowpan.h include
From: Johan Hedberg <[email protected]>
The 6lowpan.c file was missing an #include statement for 6lowpan.h. Without it we get the following type of warnings:
net/bluetooth/6lowpan.c:320:5: warning: symbol 'bt_6lowpan_recv' was not declared. Should it be static? net/bluetooth/6lowpan.c:737:5: warning: symbol 'bt_6lowpan_add_conn' was not declared. Should it be static? net/bluetooth/6lowpan.c:805:5: warning: symbol 'bt_6lowpan_del_conn' was not declared. Should it be static? net/bluetooth/6lowpan.c:878:5: warning: symbol 'bt_6lowpan_init' was not declared. Should it be static? net/bluetooth/6lowpan.c:883:6: warning: symbol 'bt_6lowpan_cleanup' was not declared. Should it be static?
--- net/bluetooth/6lowpan.c | 2 ++ 1 file changed, 2 insertions(+)
net/bluetooth/6lowpan.c +2 -0
@@ -26,6 +26,8 @@#include <net/bluetooth/hci_core.h> #include <net/bluetooth/l2cap.h> +#include "6lowpan.h" +#include "../ieee802154/6lowpan.h" /* for the compression support */ #define IFACE_NAME_TEMPLATE "bt%d"
Signature · 1 line
1.8.4.2
PATCH 2/2 Bluetooth: Fix test for lookup_dev return value
From: Johan Hedberg <[email protected]>
The condition wouldn't have previously caused -ENOENT to be returned if dev was NULL. The proper condition should be if (!dev || !dev->netdev).
--- net/bluetooth/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/6lowpan.c +1 -1
@@ -330,7 +330,7 @@ int bt_6lowpan_recv(struct l2cap_conn *conn, struct sk_buff *skb)return -ENOENT ; dev =lookup_dev (conn); -if (dev && !dev->netdev) +if (!dev || !dev->netdev)return -ENOENT ; err =recv_pkt (skb, dev->netdev, conn);
Signature · 1 line
1.8.4.2
Marcel Holtmann
maintainerRe: [PATCH 2/2] Bluetooth: Fix test for lookup_dev return value
Hi Johan,
Quoted 7 lines
The condition wouldn't have previously caused
-ENOENTto be returned if dev was NULL. The proper condition should be if (!dev || !dev->netdev).Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/6lowpan.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
Marcel Holtmann
maintainerHi Johan,
Quoted 9 lines
The
6lowpan.cfile was missing an #include statement for6lowpan.h. Without it we get the following type of warnings:
net/bluetooth/6lowpan.c:320:5: warning: symbol 'bt_6lowpan_recv' was not declared. Should it be static?net/bluetooth/6lowpan.c:737:5: warning: symbol 'bt_6lowpan_add_conn' was not declared. Should it be static?net/bluetooth/6lowpan.c:805:5: warning: symbol 'bt_6lowpan_del_conn' was not declared. Should it be static?net/bluetooth/6lowpan.c:878:5: warning: symbol 'bt_6lowpan_init' was not declared. Should it be static?net/bluetooth/6lowpan.c:883:6: warning: symbol 'bt_6lowpan_cleanup' was not declared. Should it be static?
Quoted 4 lines
Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/6lowpan.c| 2 ++1 file changed, 2 insertions(+)
patch has been applied to bluetooth-next tree.
Regards
Marcel