diff mbox series

[net,2/2] net: dsa: realtek: fix missing new lines in error messages

Message ID 20230315130917.3633491-2-a.fatoum@pengutronix.de (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net,1/2] net: dsa: realtek: fix out-of-bounds access | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch warning WARNING: line length of 81 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ahmad Fatoum March 15, 2023, 1:09 p.m. UTC
Some error messages lack a new line, add them.

Fixes: d40f607c181f ("net: dsa: realtek: rtl8365mb: add RTL8367S support")
Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/net/dsa/realtek/rtl8365mb.c    | 2 +-
 drivers/net/dsa/realtek/rtl8366-core.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Linus Walleij March 15, 2023, 1:16 p.m. UTC | #1
On Wed, Mar 15, 2023 at 2:09 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:

> Some error messages lack a new line, add them.
>
> Fixes: d40f607c181f ("net: dsa: realtek: rtl8365mb: add RTL8367S support")
> Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Alvin Šipraga March 15, 2023, 1:21 p.m. UTC | #2
On Wed, Mar 15, 2023 at 02:09:16PM +0100, Ahmad Fatoum wrote:
> Some error messages lack a new line, add them.
> 
> Fixes: d40f607c181f ("net: dsa: realtek: rtl8365mb: add RTL8367S support")
> Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---

Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>

>  drivers/net/dsa/realtek/rtl8365mb.c    | 2 +-
>  drivers/net/dsa/realtek/rtl8366-core.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c
> index da31d8b839ac..33d28951f461 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb.c
> @@ -2068,7 +2068,7 @@ static int rtl8365mb_detect(struct realtek_priv *priv)
>  
>  	if (!mb->chip_info) {
>  		dev_err(priv->dev,
> -			"unrecognized switch (id=0x%04x, ver=0x%04x)", chip_id,
> +			"unrecognized switch (id=0x%04x, ver=0x%04x)\n", chip_id,
>  			chip_ver);
>  		return -ENODEV;
>  	}
> diff --git a/drivers/net/dsa/realtek/rtl8366-core.c b/drivers/net/dsa/realtek/rtl8366-core.c
> index dc5f75be3017..f353483b281b 100644
> --- a/drivers/net/dsa/realtek/rtl8366-core.c
> +++ b/drivers/net/dsa/realtek/rtl8366-core.c
> @@ -329,7 +329,7 @@ int rtl8366_vlan_add(struct dsa_switch *ds, int port,
>  
>  	ret = rtl8366_set_vlan(priv, vlan->vid, member, untag, 0);
>  	if (ret) {
> -		dev_err(priv->dev, "failed to set up VLAN %04x", vlan->vid);
> +		dev_err(priv->dev, "failed to set up VLAN %04x\n", vlan->vid);
>  		return ret;
>  	}
>  
> @@ -338,7 +338,7 @@ int rtl8366_vlan_add(struct dsa_switch *ds, int port,
>  
>  	ret = rtl8366_set_pvid(priv, port, vlan->vid);
>  	if (ret) {
> -		dev_err(priv->dev, "failed to set PVID on port %d to VLAN %04x",
> +		dev_err(priv->dev, "failed to set PVID on port %d to VLAN %04x\n",
>  			port, vlan->vid);
>  		return ret;
>  	}
> -- 
> 2.30.2
>
Florian Fainelli March 15, 2023, 8:22 p.m. UTC | #3
On 3/15/23 06:09, Ahmad Fatoum wrote:
> Some error messages lack a new line, add them.
> 
> Fixes: d40f607c181f ("net: dsa: realtek: rtl8365mb: add RTL8367S support")
> Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Not sure this deserves a fixes tag, but I guess why not.
Jakub Kicinski March 17, 2023, 4:05 a.m. UTC | #4
On Wed, 15 Mar 2023 14:09:16 +0100 Ahmad Fatoum wrote:
> Some error messages lack a new line, add them.

I thought printk() and friends automatically add a new line these days,
unless continuation is specifically requested. Is that not the case?
Have you seen these prints actually getting mangled?

> Fixes: d40f607c181f ("net: dsa: realtek: rtl8365mb: add RTL8367S support")
> Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Ahmad Fatoum March 22, 2023, 3:47 p.m. UTC | #5
On 17.03.23 05:05, Jakub Kicinski wrote:
> On Wed, 15 Mar 2023 14:09:16 +0100 Ahmad Fatoum wrote:
>> Some error messages lack a new line, add them.
> 
> I thought printk() and friends automatically add a new line these days,
> unless continuation is specifically requested. Is that not the case?
> Have you seen these prints actually getting mangled?

I did not. I had noticed the asymmetry with other error prints in the
same file and assumed this to be unintended. Good to know this no
longer causes an issue nowadays.

Sorry for the noise and please disregard this patch.

Thanks,
Ahmad

> 
>> Fixes: d40f607c181f ("net: dsa: realtek: rtl8365mb: add RTL8367S support")
>> Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>
diff mbox series

Patch

diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c
index da31d8b839ac..33d28951f461 100644
--- a/drivers/net/dsa/realtek/rtl8365mb.c
+++ b/drivers/net/dsa/realtek/rtl8365mb.c
@@ -2068,7 +2068,7 @@  static int rtl8365mb_detect(struct realtek_priv *priv)
 
 	if (!mb->chip_info) {
 		dev_err(priv->dev,
-			"unrecognized switch (id=0x%04x, ver=0x%04x)", chip_id,
+			"unrecognized switch (id=0x%04x, ver=0x%04x)\n", chip_id,
 			chip_ver);
 		return -ENODEV;
 	}
diff --git a/drivers/net/dsa/realtek/rtl8366-core.c b/drivers/net/dsa/realtek/rtl8366-core.c
index dc5f75be3017..f353483b281b 100644
--- a/drivers/net/dsa/realtek/rtl8366-core.c
+++ b/drivers/net/dsa/realtek/rtl8366-core.c
@@ -329,7 +329,7 @@  int rtl8366_vlan_add(struct dsa_switch *ds, int port,
 
 	ret = rtl8366_set_vlan(priv, vlan->vid, member, untag, 0);
 	if (ret) {
-		dev_err(priv->dev, "failed to set up VLAN %04x", vlan->vid);
+		dev_err(priv->dev, "failed to set up VLAN %04x\n", vlan->vid);
 		return ret;
 	}
 
@@ -338,7 +338,7 @@  int rtl8366_vlan_add(struct dsa_switch *ds, int port,
 
 	ret = rtl8366_set_pvid(priv, port, vlan->vid);
 	if (ret) {
-		dev_err(priv->dev, "failed to set PVID on port %d to VLAN %04x",
+		dev_err(priv->dev, "failed to set PVID on port %d to VLAN %04x\n",
 			port, vlan->vid);
 		return ret;
 	}