Re: [PATCH v1 20/26] net: dsa: microchip: make ksz8_r_sta_mac_table() static

From: Arun.Ramadoss
Date: Tue Nov 29 2022 - 00:08:56 EST


Hi Oleksij,

On Mon, 2022-11-28 at 12:59 +0100, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> It is used only in ksz8795.c, no need to export it.

You can consider grouping patch 8, 20 and 23 into single patch. Since
all adding static to function namely ksz8_r_dyn_mac_table,
ksz8_r_sta_mac_table and ksz8_w_sta_mac_table.

>
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> ---
> drivers/net/dsa/microchip/ksz8.h | 2 --
> drivers/net/dsa/microchip/ksz8795.c | 4 ++--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/dsa/microchip/ksz8.h
> b/drivers/net/dsa/microchip/ksz8.h
> index a28fa7cd4d98..ed72ec626593 100644
> --- a/drivers/net/dsa/microchip/ksz8.h
> +++ b/drivers/net/dsa/microchip/ksz8.h
> @@ -19,8 +19,6 @@ void ksz8_flush_dyn_mac_table(struct ksz_device
> *dev, int port);
> void ksz8_port_setup(struct ksz_device *dev, int port, bool
> cpu_port);
> int ksz8_r_phy(struct ksz_device *dev, u16 phy, u16 reg, u16 *val);
> int ksz8_w_phy(struct ksz_device *dev, u16 phy, u16 reg, u16 val);
> -int ksz8_r_sta_mac_table(struct ksz_device *dev, u16 addr,
> - struct alu_struct *alu);
> void ksz8_w_sta_mac_table(struct ksz_device *dev, u16 addr,
> struct alu_struct *alu);
> void ksz8_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, u64
> *cnt);
> diff --git a/drivers/net/dsa/microchip/ksz8795.c
> b/drivers/net/dsa/microchip/ksz8795.c
> index 31c77e086a9d..1c08103c9f50 100644
> --- a/drivers/net/dsa/microchip/ksz8795.c
> +++ b/drivers/net/dsa/microchip/ksz8795.c
> @@ -456,8 +456,8 @@ static int ksz8_r_dyn_mac_table(struct ksz_device
> *dev, u16 addr, u8 *mac_addr,
> return ret;
> }
>
> -int ksz8_r_sta_mac_table(struct ksz_device *dev, u16 addr,
> - struct alu_struct *alu)
> +static int ksz8_r_sta_mac_table(struct ksz_device *dev, u16 addr,
> + struct alu_struct *alu)
> {
> u32 data_hi, data_lo;
> const u8 *shifts;
> --
> 2.30.2
>