]> www.infradead.org Git - nvme.git/commitdiff
Bluetooth: hci_core, hci_sync: cleanup struct discovery_state
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 18 Jun 2024 18:59:32 +0000 (21:59 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 Jul 2024 01:34:43 +0000 (21:34 -0400)
After commit 78db544b5d27 ("Bluetooth: hci_core: Remove le_restart_scan
work"), 'scan_start' and 'scan_duration' of 'struct discovery_state'
are still initialized but actually unused. So remove the aforementioned
fields and adjust 'hci_discovery_filter_clear()' and 'le_scan_disable()'
accordingly. Compile tested only.

Fixes: 78db544b5d27 ("Bluetooth: hci_core: Remove le_restart_scan work")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_sync.c

index f7de2681d457e8b606937feeae43fd47ca630aa0..eaeaf3dc07aa0fe78abf1a15f4e35e518577ffd1 100644 (file)
@@ -91,8 +91,6 @@ struct discovery_state {
        s8                      rssi;
        u16                     uuid_count;
        u8                      (*uuids)[16];
-       unsigned long           scan_start;
-       unsigned long           scan_duration;
        unsigned long           name_resolve_timeout;
 };
 
@@ -891,8 +889,6 @@ static inline void hci_discovery_filter_clear(struct hci_dev *hdev)
        hdev->discovery.uuid_count = 0;
        kfree(hdev->discovery.uuids);
        hdev->discovery.uuids = NULL;
-       hdev->discovery.scan_start = 0;
-       hdev->discovery.scan_duration = 0;
 }
 
 bool hci_discovery_active(struct hci_dev *hdev);
index 82db6092965b2dfcedf78bfe4e2065ecec5b219c..ccad43f104158d1246c6b007878ed76a485f24b9 100644 (file)
@@ -371,8 +371,6 @@ static void le_scan_disable(struct work_struct *work)
                goto _return;
        }
 
-       hdev->discovery.scan_start = 0;
-
        /* If we were running LE only scan, change discovery state. If
         * we were running both LE and BR/EDR inquiry simultaneously,
         * and BR/EDR inquiry is already finished, stop discovery,