Re: [PATCH net-next v4 02/11] net: dsa: realtek: rename realtek_smi to realtek_priv

Jakub Kicinski
2022-01-07T03:42:23Z

On Wed, 5 Jan 2022 00:15:06 -0300 Luiz Angelo Daros de Luca wrote:
> /**
> - * struct realtek_smi_ops - vtable for the per-SMI-chiptype operations
> + * struct realtek_ops - vtable for the per-SMI-chiptype operations
> * @detect: detects the chiptype

This kdoc is missing decriptions for a lot of members.

Would you mind adding a patch to the front of the series to resolve all
kdoc issues in realtek-smi-core.h AKA realtek.h so that we don't get
the errors re-reported each time the file is renamed in the series?
Since the kdoc doesn't add much here I think you can just replace the
/** with a /* for now, or remove it completely.

> */
> -struct realtek_smi_ops {
> - int (*detect)(struct realtek_smi *smi);
> - int (*reset_chip)(struct realtek_smi *smi);
> - int (*setup)(struct realtek_smi *smi);
> - void (*cleanup)(struct realtek_smi *smi);
> - int (*get_mib_counter)(struct realtek_smi *smi,
> +struct realtek_ops {
> + int (*detect)(struct realtek_priv *priv);
> + int (*reset_chip)(struct realtek_priv *priv);
> + int (*setup)(struct realtek_priv *priv);
> + void (*cleanup)(struct realtek_priv *priv);
> + int (*get_mib_counter)(struct realtek_priv *priv,
> int port,
> struct rtl8366_mib_counter *mib,
> u64 *mibvalue);
> - int (*get_vlan_mc)(struct realtek_smi *smi, u32 index,
> + int (*get_vlan_mc)(struct realtek_priv *priv, u32 index,
> struct rtl8366_vlan_mc *vlanmc);
> - int (*set_vlan_mc)(struct realtek_smi *smi, u32 index,
> + int (*set_vlan_mc)(struct realtek_priv *priv, u32 index,
> const struct rtl8366_vlan_mc *vlanmc);
> - int (*get_vlan_4k)(struct realtek_smi *smi, u32 vid,
> + int (*get_vlan_4k)(struct realtek_priv *priv, u32 vid,
> struct rtl8366_vlan_4k *vlan4k);
> - int (*set_vlan_4k)(struct realtek_smi *smi,
> + int (*set_vlan_4k)(struct realtek_priv *priv,
> const struct rtl8366_vlan_4k *vlan4k);
> - int (*get_mc_index)(struct realtek_smi *smi, int port, int *val);
> - int (*set_mc_index)(struct realtek_smi *smi, int port, int index);
> - bool (*is_vlan_valid)(struct realtek_smi *smi, unsigned int vlan);
> - int (*enable_vlan)(struct realtek_smi *smi, bool enable);
> - int (*enable_vlan4k)(struct realtek_smi *smi, bool enable);
> - int (*enable_port)(struct realtek_smi *smi, int port, bool enable);
> - int (*phy_read)(struct realtek_smi *smi, int phy, int regnum);
> - int (*phy_write)(struct realtek_smi *smi, int phy, int regnum,
> + int (*get_mc_index)(struct realtek_priv *priv, int port, int *val);
> + int (*set_mc_index)(struct realtek_priv *priv, int port, int index);
> + bool (*is_vlan_valid)(struct realtek_priv *priv, unsigned int vlan);
> + int (*enable_vlan)(struct realtek_priv *priv, bool enable);
> + int (*enable_vlan4k)(struct realtek_priv *priv, bool enable);
> + int (*enable_port)(struct realtek_priv *priv, int port, bool enable);
> + int (*phy_read)(struct realtek_priv *priv, int phy, int regnum);
> + int (*phy_write)(struct realtek_priv *priv, int phy, int regnum,
> u16 val);
> };