Message ID | 20210925132311.2040272-7-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | RTL8366(RB) cleanups part 1 | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 23 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On 9/25/21 3:23 PM, Linus Walleij wrote: > We don't need a message for every VLAN association, dbg > is fine. The message about adding the DSA or CPU > port to a VLAN is directly misleading, this is perfectly > fine. > > Cc: Vladimir Oltean <olteanv@gmail.com> > Cc: Mauri Sandberg <sandberg@mailfence.com> > Cc: Alvin Šipraga <alsi@bang-olufsen.dk> > Cc: DENG Qingfang <dqfext@gmail.com> > Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> > ChangeLog v5->v6: > - No changes just resending with the rest of the > patches. > ChangeLog v4->v5: > - Collect Florians review tag. > ChangeLog v1->v4: > - New patch to deal with confusing messages and too talkative > DSA bridge. > --- > drivers/net/dsa/rtl8366.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c > index f815cd16ad48..bb6189aedcd4 100644 > --- a/drivers/net/dsa/rtl8366.c > +++ b/drivers/net/dsa/rtl8366.c > @@ -318,12 +318,9 @@ int rtl8366_vlan_add(struct dsa_switch *ds, int port, > return ret; > } > > - dev_info(smi->dev, "add VLAN %d on port %d, %s, %s\n", > - vlan->vid, port, untagged ? "untagged" : "tagged", > - pvid ? " PVID" : "no PVID"); > - > - if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port)) > - dev_err(smi->dev, "port is DSA or CPU port\n"); > + dev_dbg(smi->dev, "add VLAN %d on port %d, %s, %s\n", > + vlan->vid, port, untagged ? "untagged" : "tagged", > + pvid ? " PVID" : "no PVID"); s/" PVID"/"PVID"/ > > member |= BIT(port); > > @@ -356,7 +353,7 @@ int rtl8366_vlan_del(struct dsa_switch *ds, int port, > struct realtek_smi *smi = ds->priv; > int ret, i; > > - dev_info(smi->dev, "del VLAN %04x on port %d\n", vlan->vid, port); > + dev_dbg(smi->dev, "del VLAN %d on port %d\n", vlan->vid, port); > > for (i = 0; i < smi->num_vlan_mc; i++) { > struct rtl8366_vlan_mc vlanmc; >
On Sat, Sep 25, 2021 at 03:23:11PM +0200, Linus Walleij wrote: > We don't need a message for every VLAN association, dbg > is fine. The message about adding the DSA or CPU > port to a VLAN is directly misleading, this is perfectly > fine. > > Cc: Vladimir Oltean <olteanv@gmail.com> > Cc: Mauri Sandberg <sandberg@mailfence.com> > Cc: Alvin Šipraga <alsi@bang-olufsen.dk> > Cc: DENG Qingfang <dqfext@gmail.com> > Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > ChangeLog v5->v6: > - No changes just resending with the rest of the > patches. > ChangeLog v4->v5: > - Collect Florians review tag. > ChangeLog v1->v4: > - New patch to deal with confusing messages and too talkative > DSA bridge. > --- > drivers/net/dsa/rtl8366.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c > index f815cd16ad48..bb6189aedcd4 100644 > --- a/drivers/net/dsa/rtl8366.c > +++ b/drivers/net/dsa/rtl8366.c > @@ -318,12 +318,9 @@ int rtl8366_vlan_add(struct dsa_switch *ds, int port, > return ret; > } > > - dev_info(smi->dev, "add VLAN %d on port %d, %s, %s\n", > - vlan->vid, port, untagged ? "untagged" : "tagged", > - pvid ? " PVID" : "no PVID"); > - > - if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port)) > - dev_err(smi->dev, "port is DSA or CPU port\n"); > + dev_dbg(smi->dev, "add VLAN %d on port %d, %s, %s\n", > + vlan->vid, port, untagged ? "untagged" : "tagged", > + pvid ? " PVID" : "no PVID"); This is better, not going to complain too much, but I mean, rtl8366_set_vlan and rtl8366_set_pvid already have debugging prints in them, how can you tolerate so many superfluous prints, what do they bring useful? > > member |= BIT(port); > > @@ -356,7 +353,7 @@ int rtl8366_vlan_del(struct dsa_switch *ds, int port, > struct realtek_smi *smi = ds->priv; > int ret, i; > > - dev_info(smi->dev, "del VLAN %04x on port %d\n", vlan->vid, port); > + dev_dbg(smi->dev, "del VLAN %d on port %d\n", vlan->vid, port); > > for (i = 0; i < smi->num_vlan_mc; i++) { > struct rtl8366_vlan_mc vlanmc; > -- > 2.31.1 >
On Sat, Sep 25, 2021 at 8:56 PM Vladimir Oltean <olteanv@gmail.com> wrote: > > - dev_info(smi->dev, "add VLAN %d on port %d, %s, %s\n", > > - vlan->vid, port, untagged ? "untagged" : "tagged", > > - pvid ? " PVID" : "no PVID"); > > - > > - if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port)) > > - dev_err(smi->dev, "port is DSA or CPU port\n"); > > + dev_dbg(smi->dev, "add VLAN %d on port %d, %s, %s\n", > > + vlan->vid, port, untagged ? "untagged" : "tagged", > > + pvid ? " PVID" : "no PVID"); > > This is better, not going to complain too much, but I mean, > rtl8366_set_vlan and rtl8366_set_pvid already have debugging prints in > them, how can you tolerate so many superfluous prints, what do they > bring useful? I actually use them ... I suppose one can use ftrace instead and/or gdb, but I'm one of those die hard printk() debuggers and I like to follow what happens like that. When the driver gets mature we can delete most or all of the dev_dbg() messages I think. Yours, Linus Walleij
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index f815cd16ad48..bb6189aedcd4 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c @@ -318,12 +318,9 @@ int rtl8366_vlan_add(struct dsa_switch *ds, int port, return ret; } - dev_info(smi->dev, "add VLAN %d on port %d, %s, %s\n", - vlan->vid, port, untagged ? "untagged" : "tagged", - pvid ? " PVID" : "no PVID"); - - if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port)) - dev_err(smi->dev, "port is DSA or CPU port\n"); + dev_dbg(smi->dev, "add VLAN %d on port %d, %s, %s\n", + vlan->vid, port, untagged ? "untagged" : "tagged", + pvid ? " PVID" : "no PVID"); member |= BIT(port); @@ -356,7 +353,7 @@ int rtl8366_vlan_del(struct dsa_switch *ds, int port, struct realtek_smi *smi = ds->priv; int ret, i; - dev_info(smi->dev, "del VLAN %04x on port %d\n", vlan->vid, port); + dev_dbg(smi->dev, "del VLAN %d on port %d\n", vlan->vid, port); for (i = 0; i < smi->num_vlan_mc; i++) { struct rtl8366_vlan_mc vlanmc;