diff mbox series

rtw88: make functions static

Message ID 20190713013215.215008-1-briannorris@chromium.org (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show
Series rtw88: make functions static | expand

Commit Message

Brian Norris July 13, 2019, 1:32 a.m. UTC
They're only used in phy.c.

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/net/wireless/realtek/rtw88/phy.c | 13 ++++++++++---
 drivers/net/wireless/realtek/rtw88/phy.h | 13 -------------
 2 files changed, 10 insertions(+), 16 deletions(-)

Comments

Tony Chuang July 15, 2019, 2:24 a.m. UTC | #1
> Subject: [PATCH] rtw88: make functions static
> 
> They're only used in phy.c.
> 
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
>  drivers/net/wireless/realtek/rtw88/phy.c | 13 ++++++++++---
>  drivers/net/wireless/realtek/rtw88/phy.h | 13 -------------
>  2 files changed, 10 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/phy.c
> b/drivers/net/wireless/realtek/rtw88/phy.c
> index 4ec8dcf17361..4bb36eba7080 100644
> --- a/drivers/net/wireless/realtek/rtw88/phy.c
> +++ b/drivers/net/wireless/realtek/rtw88/phy.c
> @@ -140,7 +140,7 @@ void rtw_phy_init(struct rtw_dev *rtwdev)
>  	dm_info->igi_history[0] = rtw_read32_mask(rtwdev, addr, mask);
>  }
> 
> -void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi)
> +static void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi)
>  {
>  	struct rtw_chip_info *chip = rtwdev->chip;
>  	struct rtw_hal *hal = &rtwdev->hal;
> @@ -1603,8 +1603,15 @@ static s8 rtw_phy_get_tx_power_limit(struct
> rtw_dev *rtwdev, u8 band,
>  	return (s8)rtwdev->chip->max_power_index;
>  }
> 
> -void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate,
> u8 bw,
> -			     u8 ch, u8 regd, struct rtw_power_params *pwr_param)
> +struct rtw_power_params {
> +	u8 pwr_base;
> +	s8 pwr_offset;
> +	s8 pwr_limit;
> +};
> +
> +static void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8
> rate,
> +				    u8 bw, u8 ch, u8 regd,
> +				    struct rtw_power_params *pwr_param)
>  {
>  	struct rtw_hal *hal = &rtwdev->hal;
>  	struct rtw_txpwr_idx *pwr_idx;
> diff --git a/drivers/net/wireless/realtek/rtw88/phy.h
> b/drivers/net/wireless/realtek/rtw88/phy.h
> index 7c8eb732b13c..0f90ea24c6d7 100644
> --- a/drivers/net/wireless/realtek/rtw88/phy.h
> +++ b/drivers/net/wireless/realtek/rtw88/phy.h
> @@ -103,19 +103,6 @@ static inline int rtw_check_supported_rfe(struct
> rtw_dev *rtwdev)
>  	return 0;
>  }
> 
> -void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi);
> -
> -struct rtw_power_params {
> -	u8 pwr_base;
> -	s8 pwr_offset;
> -	s8 pwr_limit;
> -};
> -
> -void
> -rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path,
> -			u8 rate, u8 bw, u8 ch, u8 regd,
> -			struct rtw_power_params *pwr_param);
> -
>  #define	MASKBYTE0		0xff
>  #define	MASKBYTE1		0xff00
>  #define	MASKBYTE2		0xff0000
> --


I am sorry I have to NACK it.

Nothing wrong about this patch. Because in the last patch set I sent has
11 patches, but one of them is not applied by Kalle.
And I am going to resend it, which will use rtw_get_tx_power_params
in debug.c

Thanks,
Yan-Hsuan
Brian Norris July 15, 2019, 5:11 p.m. UTC | #2
On Sun, Jul 14, 2019 at 7:24 PM Tony Chuang <yhchuang@realtek.com> wrote:
> I am sorry I have to NACK it.
>
> Nothing wrong about this patch. Because in the last patch set I sent has
> 11 patches, but one of them is not applied by Kalle.
> And I am going to resend it, which will use rtw_get_tx_power_params
> in debug.c

I suppose that's fine with me. I've marked it as Rejected in Patchwork.

(Normally, I would say: it's your fault for leaving these things
unused. But it was in the middle of the series, where you were aiming
to start using it by the end.)

It would still be nice to see the promised v2:

https://patchwork.kernel.org/patch/10966403/

Regards,
Brian
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c
index 4ec8dcf17361..4bb36eba7080 100644
--- a/drivers/net/wireless/realtek/rtw88/phy.c
+++ b/drivers/net/wireless/realtek/rtw88/phy.c
@@ -140,7 +140,7 @@  void rtw_phy_init(struct rtw_dev *rtwdev)
 	dm_info->igi_history[0] = rtw_read32_mask(rtwdev, addr, mask);
 }
 
-void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi)
+static void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi)
 {
 	struct rtw_chip_info *chip = rtwdev->chip;
 	struct rtw_hal *hal = &rtwdev->hal;
@@ -1603,8 +1603,15 @@  static s8 rtw_phy_get_tx_power_limit(struct rtw_dev *rtwdev, u8 band,
 	return (s8)rtwdev->chip->max_power_index;
 }
 
-void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw,
-			     u8 ch, u8 regd, struct rtw_power_params *pwr_param)
+struct rtw_power_params {
+	u8 pwr_base;
+	s8 pwr_offset;
+	s8 pwr_limit;
+};
+
+static void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate,
+				    u8 bw, u8 ch, u8 regd,
+				    struct rtw_power_params *pwr_param)
 {
 	struct rtw_hal *hal = &rtwdev->hal;
 	struct rtw_txpwr_idx *pwr_idx;
diff --git a/drivers/net/wireless/realtek/rtw88/phy.h b/drivers/net/wireless/realtek/rtw88/phy.h
index 7c8eb732b13c..0f90ea24c6d7 100644
--- a/drivers/net/wireless/realtek/rtw88/phy.h
+++ b/drivers/net/wireless/realtek/rtw88/phy.h
@@ -103,19 +103,6 @@  static inline int rtw_check_supported_rfe(struct rtw_dev *rtwdev)
 	return 0;
 }
 
-void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi);
-
-struct rtw_power_params {
-	u8 pwr_base;
-	s8 pwr_offset;
-	s8 pwr_limit;
-};
-
-void
-rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path,
-			u8 rate, u8 bw, u8 ch, u8 regd,
-			struct rtw_power_params *pwr_param);
-
 #define	MASKBYTE0		0xff
 #define	MASKBYTE1		0xff00
 #define	MASKBYTE2		0xff0000