Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: MGMT: Remove unused mgmt_*_discovery_complete

mgmt_start_discovery_complete() and mgmt_stop_discovery_complete() last
uses were removed in 2022 by
commit ec2904c259c5 ("Bluetooth: Remove dead code from hci_request.c")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Dr. David Alan Gilbert and committed by
Luiz Augusto von Dentz
60bfe8a7 276af34d

-42
-2
include/net/bluetooth/hci_core.h
··· 2354 2354 void mgmt_set_class_of_dev_complete(struct hci_dev *hdev, u8 *dev_class, 2355 2355 u8 status); 2356 2356 void mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status); 2357 - void mgmt_start_discovery_complete(struct hci_dev *hdev, u8 status); 2358 - void mgmt_stop_discovery_complete(struct hci_dev *hdev, u8 status); 2359 2357 void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, 2360 2358 u8 addr_type, u8 *dev_class, s8 rssi, u32 flags, 2361 2359 u8 *eir, u16 eir_len, u8 *scan_rsp, u8 scan_rsp_len,
-40
net/bluetooth/mgmt.c
··· 5743 5743 return err; 5744 5744 } 5745 5745 5746 - void mgmt_start_discovery_complete(struct hci_dev *hdev, u8 status) 5747 - { 5748 - struct mgmt_pending_cmd *cmd; 5749 - 5750 - bt_dev_dbg(hdev, "status %u", status); 5751 - 5752 - hci_dev_lock(hdev); 5753 - 5754 - cmd = pending_find(MGMT_OP_START_DISCOVERY, hdev); 5755 - if (!cmd) 5756 - cmd = pending_find(MGMT_OP_START_SERVICE_DISCOVERY, hdev); 5757 - 5758 - if (!cmd) 5759 - cmd = pending_find(MGMT_OP_START_LIMITED_DISCOVERY, hdev); 5760 - 5761 - if (cmd) { 5762 - cmd->cmd_complete(cmd, mgmt_status(status)); 5763 - mgmt_pending_remove(cmd); 5764 - } 5765 - 5766 - hci_dev_unlock(hdev); 5767 - } 5768 - 5769 5746 static bool discovery_type_is_valid(struct hci_dev *hdev, uint8_t type, 5770 5747 uint8_t *mgmt_status) 5771 5748 { ··· 5993 6016 failed: 5994 6017 hci_dev_unlock(hdev); 5995 6018 return err; 5996 - } 5997 - 5998 - void mgmt_stop_discovery_complete(struct hci_dev *hdev, u8 status) 5999 - { 6000 - struct mgmt_pending_cmd *cmd; 6001 - 6002 - bt_dev_dbg(hdev, "status %u", status); 6003 - 6004 - hci_dev_lock(hdev); 6005 - 6006 - cmd = pending_find(MGMT_OP_STOP_DISCOVERY, hdev); 6007 - if (cmd) { 6008 - cmd->cmd_complete(cmd, mgmt_status(status)); 6009 - mgmt_pending_remove(cmd); 6010 - } 6011 - 6012 - hci_dev_unlock(hdev); 6013 6019 } 6014 6020 6015 6021 static void stop_discovery_complete(struct hci_dev *hdev, void *data, int err)