2019-07-13 01:36:07

by Brian Norris

[permalink] [raw]
Subject: [PATCH] rtw88: make functions static

They're only used in phy.c.

Signed-off-by: Brian Norris <[email protected]>
---
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
--
2.22.0.510.g264f2c817a-goog


2019-07-15 02:24:50

by Tony Chuang

[permalink] [raw]
Subject: RE: [PATCH] rtw88: make functions static

> Subject: [PATCH] rtw88: make functions static
>
> They're only used in phy.c.
>
> Signed-off-by: Brian Norris <[email protected]>
> ---
> 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

2019-07-15 17:14:58

by Brian Norris

[permalink] [raw]
Subject: Re: [PATCH] rtw88: make functions static

On Sun, Jul 14, 2019 at 7:24 PM Tony Chuang <[email protected]> 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