Re: [PATCH net-next v10 12/12] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB

From: netdev-bot+sashiko

Date: Mon Nov 16 2026 - 13:56:26 EST


Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] This last patch in the series does not finish a cleanup that an
earlier patch said was temporary.

--

net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB

This patch adds the RTL8367S-VB (chip ID 0x6642, version 0x0010) to the
rtl8365mb chip table as the first chip of family D. It also adds the
rtl8365mb_family_d info structure, which hooks up the family D callbacks
added earlier in the series.

> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index ebc7d19fedd0a..1ea11b4016c0a 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c

[ ... ]

> @@ -812,6 +821,21 @@ static const struct rtl8365mb_family_info rtl8365mb_family_c = {
> .l2_mc_to_data = rtl8365mb_c_l2_mc_to_data,
> };
>
> +static const struct rtl8365mb_family_info rtl8365mb_family_d = {
> + .family = RTL8365MB_FAMILY_D,
> + .num_ports = RTL8365MB_D_MAX_NUM_PORTS,
> + .jam_table = rtl8365mb_init_jam_8365mb_vc,
> + .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc),
> + .ext_config_forcemode = rtl8365mb_d_ext_config_forcemode,

[Severity: Low]
This isn't a bug, but now that this initializer exists, should
rtl8365mb_d_ext_config_forcemode() become static?

The earlier patch "net: dsa: realtek: rtl8365mb: set speed for family D"
says the non-static definition was meant to be temporary:

Nothing points to it until the family D info is added together with
the chip table entry in the last patch. Until then it is not static and
is declared in rtl8365mb.h, so that the build does not warn about an
unused function.

After this patch the only user is this initializer, and it is in the same
file as the definition:

drivers/net/dsa/realtek/rtl8365mb_main.c:
int rtl8365mb_d_ext_config_forcemode(struct realtek_priv *priv, int port,
bool link, int speed, int duplex,
bool tx_pause, bool rx_pause)

The prototype is still in drivers/net/dsa/realtek/rtl8365mb.h:

int rtl8365mb_d_ext_config_forcemode(struct realtek_priv *priv, int port,
bool link, int speed, int duplex,
bool tx_pause, bool rx_pause);

Could the function be made static, with a forward declaration next to the
existing one for family C:

static int rtl8365mb_c_ext_config_forcemode(struct realtek_priv *priv, int port,
bool link, int speed, int duplex,
...

and the prototype dropped from rtl8365mb.h?

The family D VLAN 4k and L2 helpers should stay non-static, because they
are defined in rtl8365mb_vlan.c and rtl8365mb_l2.c.

> + .vlan_4k_read = rtl8365mb_d_vlan_4k_read,
> + .vlan_4k_write = rtl8365mb_d_vlan_4k_write,

[ ... ]

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/d9da17af-f49e-4878-a8dd-59a8919e6930%40yahoo.com