Skip to contentSkip to conversation

ath5k: remove unused ath5k_eeprom_info::ee_antenna

PATCH In review Jiri Slaby (SUSE) 2 participants 5 messages Dec 5, 2023 – Dec 7, 2023 Atheros ATH5K wireless driver

lore
Share & tools
lore

Jiri Slaby (SUSE)

author maintainer
#0 lore raw

PATCH 1/1 ath5k: remove unused ath5k_eeprom_info::ee_antenna

clang-struct [1] found that ee_antenna in struct ath5k_eeprom_info is unused. The commit 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") added it, but did not use it in any way. Neither, there is a later user.

So remove that unused member.

[1] https://github.com/jirislaby/clang-struct

Cc Felix Fietkau <[email protected]>
Cc Nick Kossifidis <[email protected]>
Cc Luis Chamberlain <[email protected]>
Cc Kalle Valo <[email protected]>
---
 drivers/net/wireless/ath/ath5k/eeprom.h | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/wireless/ath/ath5k/eeprom.h +0 -3
index 693296ee9693..e85b713950b1 100644
@@ -489,7 +489,4 @@ struct ath5k_eeprom_info {
 
 	/* Spur mitigation data (fbin values for spur channels) */
 	u16	ee_spur_chans[AR5K_EEPROM_N_SPUR_CHANS][AR5K_EEPROM_N_FREQ_BANDS];
-
-	/* Antenna raw switch tables */
-	u32	ee_antenna[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX];
 };
Signature · 1 line
2.43.0
#1 lore raw
Quoted 8 lines · Jiri Slaby (SUSE)

clang-struct [1] found that ee_antenna in struct ath5k_eeprom_info is unused. The commit 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") added it, but did not use it in any way. Neither, there is a later user.

So remove that unused member.

[1] https://github.com/jirislaby/clang-struct

clang-struct looks really nice, especially if it can also find unused structures. What about unused defines or enums, any chance to find those in the future? :)

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author maintainer
#2 lore raw
Quoted 7 lines · Kalle Valo
Quoted 5 lines · Jiri Slaby (SUSE)

clang-struct [1] found that ee_antenna in struct ath5k_eeprom_info is unused. The commit 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") added it, but did not use it in any way. Neither, there is a later user.

Quoted 6 lines
Quoted 3 lines

So remove that unused member.

[1] https://github.com/jirislaby/clang-struct

clang-struct looks really nice, especially if it can also find unused structures.

It can...

Quoted 2 lines

What about unused defines or enums, any chance to find those in the future? :)

All of that is IMO possible (I'm not completely sure about macros, despite clang ASTs provide a lot of info. Incl. info about them and their expansion).

It's all limited only by man-force: me.

thanks,

Signature · 2 lines
js
suse labs
#3 lore raw
Quoted 8 lines · Jiri Slaby
Quoted 7 lines · Kalle Valo
Quoted 5 lines · Jiri Slaby (SUSE)

clang-struct [1] found that ee_antenna in struct ath5k_eeprom_info is unused. The commit 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") added it, but did not use it in any way. Neither, there is a later user.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

So remove that unused member.

[1] https://github.com/jirislaby/clang-struct

clang-struct looks really nice, especially if it can also find unused structures.

It can...

Nice!

Quoted 6 lines
Quoted 2 lines

What about unused defines or enums, any chance to find those in the future? :)

All of that is IMO possible (I'm not completely sure about macros, despite clang ASTs provide a lot of info. Incl. info about them and their expansion).

Too bad, I wish that there would be a tool for that. I suspect wireless drivers have unused defines and enums, it would be nice to clean up that.

Quoted 1 line

It's all limited only by man-force: me.

Yeah, I guessed that. Thanks for making this tool available, hopefully more people start using it.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#4 lore raw
In reply to Jiri Slaby (SUSE)
Quoted 9 lines · Jiri Slaby (SUSE)

clang-struct [1] found that ee_antenna in struct ath5k_eeprom_info is unused. The commit 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") added it, but did not use it in any way. Neither, there is a later user.

So remove that unused member.

[1] https://github.com/jirislaby/clang-struct

Quoted 7 lines
Cc Felix Fietkau <[email protected]>
Cc Nick Kossifidis <[email protected]>
Cc Luis Chamberlain <[email protected]>
Cc Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

6783f10a1d07 wifi: ath5k: remove unused ath5k_eeprom_info::ee_antenna

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches