diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-07 02:55:45 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-07 03:19:12 -0400 |
commit | bf6b56db0acbe844c96fe36ab65eb7a53c6d8654 (patch) | |
tree | 807ab25cf97d1e66a774abecbe9b0d73c6d4b3e0 | |
parent | 5559435654776359679613f69f1c0a2895603a69 (diff) |
Bluetooth: Make mgmt_index_added() and mgmt_index_removed() return void
The return value from mgmt_index_added() and mgmt_index_removed()
functions is never used. So do not pretend that returning an error
would actually be handled and just make both functions return void.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | include/net/bluetooth/hci_core.h | 4 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index d80d4311ccb0..1e6f584d5149 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -1092,8 +1092,8 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event); | |||
1092 | #define DISCOV_BREDR_INQUIRY_LEN 0x08 | 1092 | #define DISCOV_BREDR_INQUIRY_LEN 0x08 |
1093 | 1093 | ||
1094 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); | 1094 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); |
1095 | int mgmt_index_added(struct hci_dev *hdev); | 1095 | void mgmt_index_added(struct hci_dev *hdev); |
1096 | int mgmt_index_removed(struct hci_dev *hdev); | 1096 | void mgmt_index_removed(struct hci_dev *hdev); |
1097 | int mgmt_set_powered_failed(struct hci_dev *hdev, int err); | 1097 | int mgmt_set_powered_failed(struct hci_dev *hdev, int err); |
1098 | int mgmt_powered(struct hci_dev *hdev, u8 powered); | 1098 | int mgmt_powered(struct hci_dev *hdev, u8 powered); |
1099 | int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable); | 1099 | int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable); |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3f628fd71b4e..811c41192ec7 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -3782,24 +3782,24 @@ done: | |||
3782 | return err; | 3782 | return err; |
3783 | } | 3783 | } |
3784 | 3784 | ||
3785 | int mgmt_index_added(struct hci_dev *hdev) | 3785 | void mgmt_index_added(struct hci_dev *hdev) |
3786 | { | 3786 | { |
3787 | if (hdev->dev_type != HCI_BREDR) | 3787 | if (hdev->dev_type != HCI_BREDR) |
3788 | return -ENOTSUPP; | 3788 | return; |
3789 | 3789 | ||
3790 | return mgmt_event(MGMT_EV_INDEX_ADDED, hdev, NULL, 0, NULL); | 3790 | mgmt_event(MGMT_EV_INDEX_ADDED, hdev, NULL, 0, NULL); |
3791 | } | 3791 | } |
3792 | 3792 | ||
3793 | int mgmt_index_removed(struct hci_dev *hdev) | 3793 | void mgmt_index_removed(struct hci_dev *hdev) |
3794 | { | 3794 | { |
3795 | u8 status = MGMT_STATUS_INVALID_INDEX; | 3795 | u8 status = MGMT_STATUS_INVALID_INDEX; |
3796 | 3796 | ||
3797 | if (hdev->dev_type != HCI_BREDR) | 3797 | if (hdev->dev_type != HCI_BREDR) |
3798 | return -ENOTSUPP; | 3798 | return; |
3799 | 3799 | ||
3800 | mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status); | 3800 | mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status); |
3801 | 3801 | ||
3802 | return mgmt_event(MGMT_EV_INDEX_REMOVED, hdev, NULL, 0, NULL); | 3802 | mgmt_event(MGMT_EV_INDEX_REMOVED, hdev, NULL, 0, NULL); |
3803 | } | 3803 | } |
3804 | 3804 | ||
3805 | static void set_bredr_scan(struct hci_request *req) | 3805 | static void set_bredr_scan(struct hci_request *req) |