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] The commit message of "net: dsa: realtek: rtl8365mb: use raw VID
for PVID on family D" gives the wrong reason for the linkage of the…
--
net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D
This commit adds family D versions of the PVID helpers. On family D the
PVID is a raw 12-bit VID in a per-port register, so these helpers do not
use the VLAN MC table. It also clears the family D PVID registers in
rtl8365mb_vlan_setup() through a new vlan_port_reset_pvid hook.
> Nothing points to the new functions until the family D info is added
> together with the chip table entry in the last patch. Until then they are
> not static and are declared in rtl8365mb_vlan.h, so that the build does
> not warn about unused functions.
[Severity: Low]
This isn't a bug, but is the reason given here accurate?
The helpers are defined in rtl8365mb_vlan.c:
rtl8365mb_d_vlan_port_get_pvid()
rtl8365mb_d_vlan_port_reset_pvid()
rtl8365mb_d_vlan_pvid_port_set()
rtl8365mb_d_vlan_pvid_port_clear()
The struct rtl8365mb_family_info tables that point to them are in
rtl8365mb_main.c. Those references cross files, so the helpers must be
non-static and declared in rtl8365mb_vlan.h for the driver to link. That
holds whether or not anything uses them yet.
The family C helpers already work this way:
drivers/net/dsa/realtek/rtl8365mb_main.c:rtl8365mb_family_c
.vlan_port_get_pvid = rtl8365mb_c_vlan_port_get_pvid,
.vlan_port_reset_pvid = rtl8365mb_c_vlan_port_reset_pvid,
.vlan_pvid_port_set = rtl8365mb_c_vlan_pvid_port_set,
.vlan_pvid_port_clear = rtl8365mb_c_vlan_pvid_port_clear,
The series ends with "net: dsa: realtek: rtl8365mb: add support for
RTL8367S-VB". After that patch, rtl8365mb_family_d in rtl8365mb_main.c
points to the rtl8365mb_d_* helpers in the same way. The helpers are
still non-static and still declared in rtl8365mb_vlan.h.
The "Until then" wording suggests the arrangement is temporary and that
the helpers will become static later. Could the commit message say
instead that the helpers are declared in rtl8365mb_vlan.h because the
family info tables in rtl8365mb_main.c reference them?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/236d…%40yahoo.com