linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna
@ 2023-12-05 11:15 Jiri Slaby (SUSE)
  2023-12-05 12:07 ` Kalle Valo
  2023-12-07 10:15 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-12-05 11:15 UTC (permalink / raw)
  To: kvalo
  Cc: linux-wireless, linux-kernel, Jiri Slaby (SUSE), Felix Fietkau,
	Nick Kossifidis, Luis Chamberlain

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

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: linux-wireless@vger.kernel.org
---
 drivers/net/wireless/ath/ath5k/eeprom.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/eeprom.h b/drivers/net/wireless/ath/ath5k/eeprom.h
index 693296ee9693..e85b713950b1 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.h
+++ b/drivers/net/wireless/ath/ath5k/eeprom.h
@@ -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];
 };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna
  2023-12-05 11:15 [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna Jiri Slaby (SUSE)
@ 2023-12-05 12:07 ` Kalle Valo
  2023-12-05 13:10   ` Jiri Slaby
  2023-12-07 10:15 ` Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2023-12-05 12:07 UTC (permalink / raw)
  To: Jiri Slaby (SUSE)
  Cc: linux-wireless, linux-kernel, Felix Fietkau, Nick Kossifidis,
	Luis Chamberlain

"Jiri Slaby (SUSE)" <jirislaby@kernel.org> writes:

> 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? :)


-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna
  2023-12-05 12:07 ` Kalle Valo
@ 2023-12-05 13:10   ` Jiri Slaby
  2023-12-05 14:45     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Slaby @ 2023-12-05 13:10 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless, linux-kernel, Felix Fietkau, Nick Kossifidis,
	Luis Chamberlain

On 05. 12. 23, 13:07, Kalle Valo wrote:
> "Jiri Slaby (SUSE)" <jirislaby@kernel.org> writes:
> 
>> 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.

It can...

> 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,
-- 
js
suse labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna
  2023-12-05 13:10   ` Jiri Slaby
@ 2023-12-05 14:45     ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-12-05 14:45 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: linux-wireless, linux-kernel, Felix Fietkau, Nick Kossifidis,
	Luis Chamberlain

Jiri Slaby <jirislaby@kernel.org> writes:

> On 05. 12. 23, 13:07, Kalle Valo wrote:
>> "Jiri Slaby (SUSE)" <jirislaby@kernel.org> writes:
>> 
>>> 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.
>
> It can...

Nice!

>> 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.

> 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.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna
  2023-12-05 11:15 [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna Jiri Slaby (SUSE)
  2023-12-05 12:07 ` Kalle Valo
@ 2023-12-07 10:15 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-12-07 10:15 UTC (permalink / raw)
  To: Jiri Slaby (SUSE)
  Cc: linux-wireless, linux-kernel, Jiri Slaby (SUSE), Felix Fietkau,
	Nick Kossifidis, Luis Chamberlain

"Jiri Slaby (SUSE)" <jirislaby@kernel.org> wrote:

> 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
> 
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Cc: Felix Fietkau <nbd@openwrt.org>
> Cc: Nick Kossifidis <mickflemm@gmail.com>
> Cc: Luis Chamberlain <mcgrof@kernel.org>
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

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

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20231205111515.21470-1-jirislaby@kernel.org/

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-07 10:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 11:15 [PATCH] ath5k: remove unused ath5k_eeprom_info::ee_antenna Jiri Slaby (SUSE)
2023-12-05 12:07 ` Kalle Valo
2023-12-05 13:10   ` Jiri Slaby
2023-12-05 14:45     ` Kalle Valo
2023-12-07 10:15 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).