* [PATCH] Bluetooth: hci_core: cleanup struct hci_dev
@ 2024-06-21 13:01 Dmitry Antipov
2024-06-21 13:21 ` Paul Menzel
2024-06-27 19:10 ` patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Antipov @ 2024-06-21 13:01 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth, Dmitry Antipov
Remove unused and set but otherwise unused 'discovery_old_state'
and 'sco_last_tx' members of 'struct hci_dev'. The first one is
a leftover after commit 182ee45da083 ("Bluetooth: hci_sync: Rework
hci_suspend_notifier"); the second one is originated from ancient
2.4.19 and I was unable to find any actual use since that.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
include/net/bluetooth/hci_core.h | 2 --
net/bluetooth/hci_sync.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index eaeaf3dc07aa..31020891fc68 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -476,7 +476,6 @@ struct hci_dev {
unsigned int iso_pkts;
unsigned long acl_last_tx;
- unsigned long sco_last_tx;
unsigned long le_last_tx;
__u8 le_tx_def_phys;
@@ -528,7 +527,6 @@ struct hci_dev {
struct discovery_state discovery;
- int discovery_old_state;
bool discovery_paused;
int advertising_old_state;
bool advertising_paused;
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index eff648853ae1..511e995f17e0 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5840,7 +5840,6 @@ static int hci_pause_discovery_sync(struct hci_dev *hdev)
return err;
hdev->discovery_paused = true;
- hdev->discovery_old_state = old_state;
hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: hci_core: cleanup struct hci_dev
2024-06-21 13:01 [PATCH] Bluetooth: hci_core: cleanup struct hci_dev Dmitry Antipov
@ 2024-06-21 13:21 ` Paul Menzel
2024-06-27 19:10 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2024-06-21 13:21 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Luiz Augusto von Dentz, linux-bluetooth
Dear Dmitry,
Thank you for the patch. Two minor comments. The verb *clean up* is
spelled with a space:
> Bluetooth: hci_core: Clean up struct hci_dev
Am 21.06.24 um 15:01 schrieb Dmitry Antipov:
> Remove unused and set but otherwise unused 'discovery_old_state'
> and 'sco_last_tx' members of 'struct hci_dev'. The first one is
> a leftover after commit 182ee45da083 ("Bluetooth: hci_sync: Rework
> hci_suspend_notifier"); the second one is originated from ancient
> 2.4.19 and I was unable to find any actual use since that.
Add a Fixes: tag?
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
> include/net/bluetooth/hci_core.h | 2 --
> net/bluetooth/hci_sync.c | 1 -
> 2 files changed, 3 deletions(-)
>
> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> index eaeaf3dc07aa..31020891fc68 100644
> --- a/include/net/bluetooth/hci_core.h
> +++ b/include/net/bluetooth/hci_core.h
> @@ -476,7 +476,6 @@ struct hci_dev {
> unsigned int iso_pkts;
>
> unsigned long acl_last_tx;
> - unsigned long sco_last_tx;
> unsigned long le_last_tx;
>
> __u8 le_tx_def_phys;
> @@ -528,7 +527,6 @@ struct hci_dev {
>
> struct discovery_state discovery;
>
> - int discovery_old_state;
> bool discovery_paused;
> int advertising_old_state;
> bool advertising_paused;
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index eff648853ae1..511e995f17e0 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -5840,7 +5840,6 @@ static int hci_pause_discovery_sync(struct hci_dev *hdev)
> return err;
>
> hdev->discovery_paused = true;
> - hdev->discovery_old_state = old_state;
> hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
>
> return 0;
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: hci_core: cleanup struct hci_dev
2024-06-21 13:01 [PATCH] Bluetooth: hci_core: cleanup struct hci_dev Dmitry Antipov
2024-06-21 13:21 ` Paul Menzel
@ 2024-06-27 19:10 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-06-27 19:10 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: luiz.dentz, linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 21 Jun 2024 16:01:55 +0300 you wrote:
> Remove unused and set but otherwise unused 'discovery_old_state'
> and 'sco_last_tx' members of 'struct hci_dev'. The first one is
> a leftover after commit 182ee45da083 ("Bluetooth: hci_sync: Rework
> hci_suspend_notifier"); the second one is originated from ancient
> 2.4.19 and I was unable to find any actual use since that.
>
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
>
> [...]
Here is the summary with links:
- Bluetooth: hci_core: cleanup struct hci_dev
https://git.kernel.org/bluetooth/bluetooth-next/c/e2b9428d33b9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-27 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21 13:01 [PATCH] Bluetooth: hci_core: cleanup struct hci_dev Dmitry Antipov
2024-06-21 13:21 ` Paul Menzel
2024-06-27 19:10 ` patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox