diff mbox series

[2/2] rtlwifi: Remove more unused functions

Message ID 20241103153857.255450-3-linux@treblig.org (mailing list archive)
State Superseded
Delegated to: Ping-Ke Shih
Headers show
Series Realtek wifi deadcoding | expand

Commit Message

Dr. David Alan Gilbert Nov. 3, 2024, 3:38 p.m. UTC
From: "Dr. David Alan Gilbert" <linux@treblig.org>

exhalbtc_dbg_control(), exhalbtc_stack_update_profile_info(),
exhalbtc_set_hci_version(), and exhalbtc_set_bt_patch_version() are
unused since their addition in 2014 by
commit aa45a673b291 ("rtlwifi: btcoexist: Add new mini driver")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c  | 34 -------------------
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h  |  6 ----
 2 files changed, 40 deletions(-)

Comments

Kalle Valo Nov. 4, 2024, 7:54 a.m. UTC | #1
linux@treblig.org writes:

> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> exhalbtc_dbg_control(), exhalbtc_stack_update_profile_info(),
> exhalbtc_set_hci_version(), and exhalbtc_set_bt_patch_version() are
> unused since their addition in 2014 by
> commit aa45a673b291 ("rtlwifi: btcoexist: Add new mini driver")
>
> Remove them.
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>

'wifi:' missing. Also in both patches the subject could be more unique.
Dr. David Alan Gilbert Nov. 4, 2024, 12:52 p.m. UTC | #2
* Kalle Valo (kvalo@kernel.org) wrote:
> linux@treblig.org writes:
> 
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> >
> > exhalbtc_dbg_control(), exhalbtc_stack_update_profile_info(),
> > exhalbtc_set_hci_version(), and exhalbtc_set_bt_patch_version() are
> > unused since their addition in 2014 by
> > commit aa45a673b291 ("rtlwifi: btcoexist: Add new mini driver")
> >
> > Remove them.
> >
> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> 
> 'wifi:' missing.

Oops, can add that.

> Also in both patches the subject could be more unique.

Do you have suggestions? I don't know the code to give good titles.
They're both 'btcoexist'; I could merge them into one

wifi: wtlwifi: Remove btcoexist deadcode

Dave

> 
> -- 
> https://patchwork.kernel.org/project/linux-wireless/list/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Kalle Valo Nov. 4, 2024, 2:16 p.m. UTC | #3
"Dr. David Alan Gilbert" <linux@treblig.org> writes:

> * Kalle Valo (kvalo@kernel.org) wrote:
>> linux@treblig.org writes:
>> 
>> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
>> >
>> > exhalbtc_dbg_control(), exhalbtc_stack_update_profile_info(),
>> > exhalbtc_set_hci_version(), and exhalbtc_set_bt_patch_version() are
>> > unused since their addition in 2014 by
>> > commit aa45a673b291 ("rtlwifi: btcoexist: Add new mini driver")
>> >
>> > Remove them.
>> >
>> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
>> 
>> 'wifi:' missing.
>
> Oops, can add that.
>
>> Also in both patches the subject could be more unique.
>
> Do you have suggestions? I don't know the code to give good titles.
> They're both 'btcoexist'; I could merge them into one
>
> wifi: wtlwifi: Remove btcoexist deadcode

No good suggestions really. Usually I add what I'm removing to the
subject but as this patch is removing several functions the subject
would be too long. Maybe something like 'wifi: rtlwifi: remove several
unused exhalbtc_*() functions?' just to throw out some ideas, I'm sure
you can come with better ones.
Dr. David Alan Gilbert Nov. 4, 2024, 2:44 p.m. UTC | #4
* Kalle Valo (kvalo@kernel.org) wrote:
> "Dr. David Alan Gilbert" <linux@treblig.org> writes:
> 
> > * Kalle Valo (kvalo@kernel.org) wrote:
> >> linux@treblig.org writes:
> >> 
> >> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> >> >
> >> > exhalbtc_dbg_control(), exhalbtc_stack_update_profile_info(),
> >> > exhalbtc_set_hci_version(), and exhalbtc_set_bt_patch_version() are
> >> > unused since their addition in 2014 by
> >> > commit aa45a673b291 ("rtlwifi: btcoexist: Add new mini driver")
> >> >
> >> > Remove them.
> >> >
> >> > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> >> 
> >> 'wifi:' missing.
> >
> > Oops, can add that.
> >
> >> Also in both patches the subject could be more unique.
> >
> > Do you have suggestions? I don't know the code to give good titles.
> > They're both 'btcoexist'; I could merge them into one
> >
> > wifi: wtlwifi: Remove btcoexist deadcode
> 
> No good suggestions really. Usually I add what I'm removing to the
> subject but as this patch is removing several functions the subject
> would be too long. Maybe something like 'wifi: rtlwifi: remove several
> unused exhalbtc_*() functions?' just to throw out some ideas, I'm sure
> you can come with better ones.

OK, I've just merged the two together, and sent it out as a single patch

[PATCH v2] wifi: rtlwifi: Remove some exhalbtc deadcod
message-id: 20241104144331.29262-1-linux@treblig.org

Dave

> 
> -- 
> https://patchwork.kernel.org/project/linux-wireless/list/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
index 74c4504065c0..478cca33e5e3 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
@@ -1782,22 +1782,6 @@  void exhalbtc_periodical(struct btc_coexist *btcoexist)
 	halbtc_normal_low_power(btcoexist);
 }
 
-void exhalbtc_dbg_control(struct btc_coexist *btcoexist,
-			  u8 code, u8 len, u8 *data)
-{
-	if (!halbtc_is_bt_coexist_available(btcoexist))
-		return;
-	btcoexist->statistics.cnt_dbg_ctrl++;
-
-	halbtc_leave_low_power(btcoexist);
-
-	halbtc_normal_low_power(btcoexist);
-}
-
-void exhalbtc_stack_update_profile_info(void)
-{
-}
-
 void exhalbtc_update_min_bt_rssi(struct btc_coexist *btcoexist, s8 bt_rssi)
 {
 	if (!halbtc_is_bt_coexist_available(btcoexist))
@@ -1806,24 +1790,6 @@  void exhalbtc_update_min_bt_rssi(struct btc_coexist *btcoexist, s8 bt_rssi)
 	btcoexist->stack_info.min_bt_rssi = bt_rssi;
 }
 
-void exhalbtc_set_hci_version(struct btc_coexist *btcoexist, u16 hci_version)
-{
-	if (!halbtc_is_bt_coexist_available(btcoexist))
-		return;
-
-	btcoexist->stack_info.hci_version = hci_version;
-}
-
-void exhalbtc_set_bt_patch_version(struct btc_coexist *btcoexist,
-				   u16 bt_hci_version, u16 bt_patch_version)
-{
-	if (!halbtc_is_bt_coexist_available(btcoexist))
-		return;
-
-	btcoexist->bt_info.bt_real_fw_ver = bt_patch_version;
-	btcoexist->bt_info.bt_hci_ver = bt_hci_version;
-}
-
 void exhalbtc_set_chip_type(struct btc_coexist *btcoexist, u8 chip_type)
 {
 	switch (chip_type) {
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
index 5d146fcb7852..d8d88a989806 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
@@ -766,12 +766,6 @@  void exhalbtc_bt_info_notify(struct btc_coexist *btcoexist, u8 *tmp_buf,
 void exhalbtc_halt_notify(struct btc_coexist *btcoexist);
 void exhalbtc_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state);
 void exhalbtc_periodical(struct btc_coexist *btcoexist);
-void exhalbtc_dbg_control(struct btc_coexist *btcoexist, u8 code, u8 len,
-			  u8 *data);
-void exhalbtc_stack_update_profile_info(void);
-void exhalbtc_set_hci_version(struct btc_coexist *btcoexist, u16 hci_version);
-void exhalbtc_set_bt_patch_version(struct btc_coexist *btcoexist,
-				   u16 bt_hci_version, u16 bt_patch_version);
 void exhalbtc_update_min_bt_rssi(struct btc_coexist *btcoexist, s8 bt_rssi);
 void exhalbtc_set_bt_exist(struct btc_coexist *btcoexist, bool bt_exist);
 void exhalbtc_set_chip_type(struct btc_coexist *btcoexist, u8 chip_type);