aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-03-14 18:54:15 +0200
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:41:32 -0300
commit2e3c35ead821498f5b0a5b6c62365fbb187420fc (patch)
tree461eefd8dc453b46d1bf4f2f5aa3706a15424c7b /net
parentBluetooth: Fix broken usage of get_unaligned_le16 (diff)
downloadlinux-dev-2e3c35ead821498f5b0a5b6c62365fbb187420fc.tar.xz
linux-dev-2e3c35ead821498f5b0a5b6c62365fbb187420fc.zip
Bluetooth: trivial: Remove sparse warnings
Fix sparse warnings related to incorrect type in assignment and static symbol. Also use const keyword. Warnings are shown below: ... net/bluetooth/mgmt.c:305:28: warning: incorrect type in assignment (different base types) net/bluetooth/mgmt.c:305:28: expected unsigned short [usertype] *opcode net/bluetooth/mgmt.c:305:28: got restricted __le16 *<noident> ... net/bluetooth/mgmt.c:2609:3: warning: symbol 'mgmt_handlers' was not declared. Should it be static? ... Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 287623c35d61..0ef4b6ca6e44 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -288,7 +288,7 @@ static int read_commands(struct sock *sk, struct hci_dev *hdev, void *data,
struct mgmt_rp_read_commands *rp;
const u16 num_commands = ARRAY_SIZE(mgmt_commands);
const u16 num_events = ARRAY_SIZE(mgmt_events);
- u16 *opcode;
+ __le16 *opcode;
size_t rp_size;
int i, err;
@@ -2647,7 +2647,7 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
return 0;
}
-struct mgmt_handler {
+static const struct mgmt_handler {
int (*func) (struct sock *sk, struct hci_dev *hdev, void *data,
u16 data_len);
bool var_len;
@@ -2704,7 +2704,7 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
struct mgmt_hdr *hdr;
u16 opcode, index, len;
struct hci_dev *hdev = NULL;
- struct mgmt_handler *handler;
+ const struct mgmt_handler *handler;
int err;
BT_DBG("got %zu bytes", msglen);