Skip to contentSkip to conversation

p54: Remove unused struct pda_antenna_gain

PATCH In review Kees Cook 2 participants 2 messages Nov 18, 2022

Subsystems (3)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 p54: Remove unused struct pda_antenna_gain

Remove struct pda_antenna_gain. It was unused and was using deprecated 0-length arrays[1].

[1] https://github.com/KSPP/linux/issues/78

Cc Christian Lamparter <[email protected]>
Cc Kalle Valo <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Paolo Abeni <[email protected]>
Cc "Gustavo A. R. Silva" <[email protected]>
---
 drivers/net/wireless/intersil/p54/eeprom.h | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/wireless/intersil/p54/eeprom.h +0 -7
index 1d0aaf54389a..10b6d96aa49e 100644
@@ -107,13 +107,6 @@ struct pda_country {
 	u8 flags;
 } __packed;
 
-struct pda_antenna_gain {
-	struct {
-		u8 gain_5GHz;	/* 0.25 dBi units */
-		u8 gain_2GHz;	/* 0.25 dBi units */
-	} __packed antenna[0];
-} __packed;
-
 struct pda_custom_wrapper {
 	__le16 entries;
 	__le16 entry_size;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 2 lines · Kees Cook

Remove struct pda_antenna_gain. It was unused and was using deprecated 0-length arrays[1].

I would like to keep it around. This struct is documenting what's coded in the PDR_ANTENNA_GAIN eeprom (specifically that units value (0.25 dBi units)).

Quoted 34 lines

[1] https://github.com/KSPP/linux/issues/78

Cc Christian Lamparter <[email protected]>
Cc Kalle Valo <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Paolo Abeni <[email protected]>
Cc "Gustavo A. R. Silva" <[email protected]>
---
  drivers/net/wireless/intersil/p54/eeprom.h | 7 -------
  1 file changed, 7 deletions(-)
drivers/net/wireless/intersil/p54/eeprom.h +0 -7
index 1d0aaf54389a..10b6d96aa49e 100644
@@ -107,13 +107,6 @@ struct pda_country {
  	u8 flags;
  } __packed;
 
-struct pda_antenna_gain {
-	struct {
-		u8 gain_5GHz;	/* 0.25 dBi units */
-		u8 gain_2GHz;	/* 0.25 dBi units */
-	} __packed antenna[0];
-} __packed;
-
  struct pda_custom_wrapper {
  	__le16 entries;
  	__le16 entry_size;