diff mbox series

p54: Remove unused struct pda_antenna_gain

Message ID 20221118210639.never.072-kees@kernel.org (mailing list archive)
State Changes Requested
Headers show
Series p54: Remove unused struct pda_antenna_gain | expand

Commit Message

Kees Cook Nov. 18, 2022, 9:06 p.m. UTC
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 <chunkeey@googlemail.com>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/net/wireless/intersil/p54/eeprom.h | 7 -------
 1 file changed, 7 deletions(-)

Comments

Christian Lamparter Nov. 18, 2022, 10:53 p.m. UTC | #1
On 11/18/22 22:06, Kees Cook wrote:
> 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)).

> [1] https://github.com/KSPP/linux/issues/78
> 
> Cc: Christian Lamparter <chunkeey@googlemail.com>
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>   drivers/net/wireless/intersil/p54/eeprom.h | 7 -------
>   1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/intersil/p54/eeprom.h b/drivers/net/wireless/intersil/p54/eeprom.h
> index 1d0aaf54389a..10b6d96aa49e 100644
> --- a/drivers/net/wireless/intersil/p54/eeprom.h
> +++ b/drivers/net/wireless/intersil/p54/eeprom.h
> @@ -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;
diff mbox series

Patch

diff --git a/drivers/net/wireless/intersil/p54/eeprom.h b/drivers/net/wireless/intersil/p54/eeprom.h
index 1d0aaf54389a..10b6d96aa49e 100644
--- a/drivers/net/wireless/intersil/p54/eeprom.h
+++ b/drivers/net/wireless/intersil/p54/eeprom.h
@@ -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;