All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
@ 2020-04-11  6:38 ` Christophe JAILLET
  0 siblings, 0 replies; 8+ messages in thread
From: Christophe JAILLET @ 2020-04-11  6:38 UTC (permalink / raw)
  To: balbi, gregkh, paul
  Cc: linux-usb, linux-kernel, kernel-janitors, Christophe JAILLET

Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.

Fixes: 541368b46b82 ("usb: phy: Add driver for the Ingenic JZ4770 USB transceiver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/usb/phy/phy-jz4770.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/phy/phy-jz4770.c b/drivers/usb/phy/phy-jz4770.c
index 3ea1f5b9bcf8..8f62dc2a90ff 100644
--- a/drivers/usb/phy/phy-jz4770.c
+++ b/drivers/usb/phy/phy-jz4770.c
@@ -125,13 +125,13 @@ static int jz4770_phy_init(struct usb_phy *phy)
 
 	err = regulator_enable(priv->vcc_supply);
 	if (err) {
-		dev_err(priv->dev, "Unable to enable VCC: %d", err);
+		dev_err(priv->dev, "Unable to enable VCC: %d\n", err);
 		return err;
 	}
 
 	err = clk_prepare_enable(priv->clk);
 	if (err) {
-		dev_err(priv->dev, "Unable to start clock: %d", err);
+		dev_err(priv->dev, "Unable to start clock: %d\n", err);
 		return err;
 	}
 
@@ -191,7 +191,7 @@ static int jz4770_phy_probe(struct platform_device *pdev)
 
 	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base)) {
-		dev_err(dev, "Failed to map registers");
+		dev_err(dev, "Failed to map registers\n");
 		return PTR_ERR(priv->base);
 	}
 
@@ -199,7 +199,7 @@ static int jz4770_phy_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->clk)) {
 		err = PTR_ERR(priv->clk);
 		if (err != -EPROBE_DEFER)
-			dev_err(dev, "Failed to get clock");
+			dev_err(dev, "Failed to get clock\n");
 		return err;
 	}
 
@@ -207,14 +207,14 @@ static int jz4770_phy_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->vcc_supply)) {
 		err = PTR_ERR(priv->vcc_supply);
 		if (err != -EPROBE_DEFER)
-			dev_err(dev, "failed to get regulator");
+			dev_err(dev, "Failed to get regulator\n");
 		return err;
 	}
 
 	err = usb_add_phy(&priv->phy, USB_PHY_TYPE_USB2);
 	if (err) {
 		if (err != -EPROBE_DEFER)
-			dev_err(dev, "Unable to register PHY");
+			dev_err(dev, "Unable to register PHY\n");
 		return err;
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
@ 2020-04-11  6:38 ` Christophe JAILLET
  0 siblings, 0 replies; 8+ messages in thread
From: Christophe JAILLET @ 2020-04-11  6:38 UTC (permalink / raw)
  To: balbi, gregkh, paul
  Cc: linux-usb, linux-kernel, kernel-janitors, Christophe JAILLET

Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.

Fixes: 541368b46b82 ("usb: phy: Add driver for the Ingenic JZ4770 USB transceiver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/usb/phy/phy-jz4770.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/phy/phy-jz4770.c b/drivers/usb/phy/phy-jz4770.c
index 3ea1f5b9bcf8..8f62dc2a90ff 100644
--- a/drivers/usb/phy/phy-jz4770.c
+++ b/drivers/usb/phy/phy-jz4770.c
@@ -125,13 +125,13 @@ static int jz4770_phy_init(struct usb_phy *phy)
 
 	err = regulator_enable(priv->vcc_supply);
 	if (err) {
-		dev_err(priv->dev, "Unable to enable VCC: %d", err);
+		dev_err(priv->dev, "Unable to enable VCC: %d\n", err);
 		return err;
 	}
 
 	err = clk_prepare_enable(priv->clk);
 	if (err) {
-		dev_err(priv->dev, "Unable to start clock: %d", err);
+		dev_err(priv->dev, "Unable to start clock: %d\n", err);
 		return err;
 	}
 
@@ -191,7 +191,7 @@ static int jz4770_phy_probe(struct platform_device *pdev)
 
 	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base)) {
-		dev_err(dev, "Failed to map registers");
+		dev_err(dev, "Failed to map registers\n");
 		return PTR_ERR(priv->base);
 	}
 
@@ -199,7 +199,7 @@ static int jz4770_phy_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->clk)) {
 		err = PTR_ERR(priv->clk);
 		if (err != -EPROBE_DEFER)
-			dev_err(dev, "Failed to get clock");
+			dev_err(dev, "Failed to get clock\n");
 		return err;
 	}
 
@@ -207,14 +207,14 @@ static int jz4770_phy_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->vcc_supply)) {
 		err = PTR_ERR(priv->vcc_supply);
 		if (err != -EPROBE_DEFER)
-			dev_err(dev, "failed to get regulator");
+			dev_err(dev, "Failed to get regulator\n");
 		return err;
 	}
 
 	err = usb_add_phy(&priv->phy, USB_PHY_TYPE_USB2);
 	if (err) {
 		if (err != -EPROBE_DEFER)
-			dev_err(dev, "Unable to register PHY");
+			dev_err(dev, "Unable to register PHY\n");
 		return err;
 	}
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
  2020-04-11  6:38 ` Christophe JAILLET
@ 2020-04-11 13:13   ` Paul Cercueil
  -1 siblings, 0 replies; 8+ messages in thread
From: Paul Cercueil @ 2020-04-11 13:13 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: balbi, gregkh, linux-usb, linux-kernel, kernel-janitors

Hi Christophe,

Le sam. 11 avril 2020 à 8:38, Christophe JAILLET 
<christophe.jaillet@wanadoo.fr> a écrit :
> Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.

Is that so?

 From what I could see these macros add the \n themselves if needed. So 
the \n were omitted on purpose.

-Paul

> Fixes: 541368b46b82 ("usb: phy: Add driver for the Ingenic JZ4770 USB 
> transceiver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/usb/phy/phy-jz4770.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/phy/phy-jz4770.c 
> b/drivers/usb/phy/phy-jz4770.c
> index 3ea1f5b9bcf8..8f62dc2a90ff 100644
> --- a/drivers/usb/phy/phy-jz4770.c
> +++ b/drivers/usb/phy/phy-jz4770.c
> @@ -125,13 +125,13 @@ static int jz4770_phy_init(struct usb_phy *phy)
> 
>  	err = regulator_enable(priv->vcc_supply);
>  	if (err) {
> -		dev_err(priv->dev, "Unable to enable VCC: %d", err);
> +		dev_err(priv->dev, "Unable to enable VCC: %d\n", err);
>  		return err;
>  	}
> 
>  	err = clk_prepare_enable(priv->clk);
>  	if (err) {
> -		dev_err(priv->dev, "Unable to start clock: %d", err);
> +		dev_err(priv->dev, "Unable to start clock: %d\n", err);
>  		return err;
>  	}
> 
> @@ -191,7 +191,7 @@ static int jz4770_phy_probe(struct 
> platform_device *pdev)
> 
>  	priv->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(priv->base)) {
> -		dev_err(dev, "Failed to map registers");
> +		dev_err(dev, "Failed to map registers\n");
>  		return PTR_ERR(priv->base);
>  	}
> 
> @@ -199,7 +199,7 @@ static int jz4770_phy_probe(struct 
> platform_device *pdev)
>  	if (IS_ERR(priv->clk)) {
>  		err = PTR_ERR(priv->clk);
>  		if (err != -EPROBE_DEFER)
> -			dev_err(dev, "Failed to get clock");
> +			dev_err(dev, "Failed to get clock\n");
>  		return err;
>  	}
> 
> @@ -207,14 +207,14 @@ static int jz4770_phy_probe(struct 
> platform_device *pdev)
>  	if (IS_ERR(priv->vcc_supply)) {
>  		err = PTR_ERR(priv->vcc_supply);
>  		if (err != -EPROBE_DEFER)
> -			dev_err(dev, "failed to get regulator");
> +			dev_err(dev, "Failed to get regulator\n");
>  		return err;
>  	}
> 
>  	err = usb_add_phy(&priv->phy, USB_PHY_TYPE_USB2);
>  	if (err) {
>  		if (err != -EPROBE_DEFER)
> -			dev_err(dev, "Unable to register PHY");
> +			dev_err(dev, "Unable to register PHY\n");
>  		return err;
>  	}
> 
> --
> 2.20.1
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
@ 2020-04-11 13:13   ` Paul Cercueil
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Cercueil @ 2020-04-11 13:13 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: balbi, gregkh, linux-usb, linux-kernel, kernel-janitors

Hi Christophe,

Le sam. 11 avril 2020 à 8:38, Christophe JAILLET 
<christophe.jaillet@wanadoo.fr> a écrit :
> Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.

Is that so?

 From what I could see these macros add the \n themselves if needed. So 
the \n were omitted on purpose.

-Paul

> Fixes: 541368b46b82 ("usb: phy: Add driver for the Ingenic JZ4770 USB 
> transceiver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/usb/phy/phy-jz4770.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/phy/phy-jz4770.c 
> b/drivers/usb/phy/phy-jz4770.c
> index 3ea1f5b9bcf8..8f62dc2a90ff 100644
> --- a/drivers/usb/phy/phy-jz4770.c
> +++ b/drivers/usb/phy/phy-jz4770.c
> @@ -125,13 +125,13 @@ static int jz4770_phy_init(struct usb_phy *phy)
> 
>  	err = regulator_enable(priv->vcc_supply);
>  	if (err) {
> -		dev_err(priv->dev, "Unable to enable VCC: %d", err);
> +		dev_err(priv->dev, "Unable to enable VCC: %d\n", err);
>  		return err;
>  	}
> 
>  	err = clk_prepare_enable(priv->clk);
>  	if (err) {
> -		dev_err(priv->dev, "Unable to start clock: %d", err);
> +		dev_err(priv->dev, "Unable to start clock: %d\n", err);
>  		return err;
>  	}
> 
> @@ -191,7 +191,7 @@ static int jz4770_phy_probe(struct 
> platform_device *pdev)
> 
>  	priv->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(priv->base)) {
> -		dev_err(dev, "Failed to map registers");
> +		dev_err(dev, "Failed to map registers\n");
>  		return PTR_ERR(priv->base);
>  	}
> 
> @@ -199,7 +199,7 @@ static int jz4770_phy_probe(struct 
> platform_device *pdev)
>  	if (IS_ERR(priv->clk)) {
>  		err = PTR_ERR(priv->clk);
>  		if (err != -EPROBE_DEFER)
> -			dev_err(dev, "Failed to get clock");
> +			dev_err(dev, "Failed to get clock\n");
>  		return err;
>  	}
> 
> @@ -207,14 +207,14 @@ static int jz4770_phy_probe(struct 
> platform_device *pdev)
>  	if (IS_ERR(priv->vcc_supply)) {
>  		err = PTR_ERR(priv->vcc_supply);
>  		if (err != -EPROBE_DEFER)
> -			dev_err(dev, "failed to get regulator");
> +			dev_err(dev, "Failed to get regulator\n");
>  		return err;
>  	}
> 
>  	err = usb_add_phy(&priv->phy, USB_PHY_TYPE_USB2);
>  	if (err) {
>  		if (err != -EPROBE_DEFER)
> -			dev_err(dev, "Unable to register PHY");
> +			dev_err(dev, "Unable to register PHY\n");
>  		return err;
>  	}
> 
> --
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
  2020-04-11 13:13   ` Paul Cercueil
@ 2020-04-11 15:46     ` Joe Perches
  -1 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2020-04-11 15:46 UTC (permalink / raw)
  To: Paul Cercueil, Christophe JAILLET
  Cc: balbi, gregkh, linux-usb, linux-kernel, kernel-janitors

On Sat, 2020-04-11 at 15:13 +0200, Paul Cercueil wrote:
> Hi Christophe,
> 
> Le sam. 11 avril 2020 à 8:38, Christophe JAILLET 
> <christophe.jaillet@wanadoo.fr> a écrit :
> > Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.
> 
> Is that so?
> From what I could see these macros add the \n themselves if needed.

Not so.

> So the \n were omitted on purpose.

Just a trivial oversight really.

AFAIK: It's an issue _only_ in two cases:

p another process emits a printk with KERN_CONT (or pr_cont)
  that might extend this message in the log on the same line.

o this message wukk not be emitted into the log until another
  message arrives



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
@ 2020-04-11 15:46     ` Joe Perches
  0 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2020-04-11 15:46 UTC (permalink / raw)
  To: Paul Cercueil, Christophe JAILLET
  Cc: balbi, gregkh, linux-usb, linux-kernel, kernel-janitors

On Sat, 2020-04-11 at 15:13 +0200, Paul Cercueil wrote:
> Hi Christophe,
> 
> Le sam. 11 avril 2020 à 8:38, Christophe JAILLET 
> <christophe.jaillet@wanadoo.fr> a écrit :
> > Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.
> 
> Is that so?
> From what I could see these macros add the \n themselves if needed.

Not so.

> So the \n were omitted on purpose.

Just a trivial oversight really.

AFAIK: It's an issue _only_ in two cases:

p another process emits a printk with KERN_CONT (or pr_cont)
  that might extend this message in the log on the same line.

o this message wukk not be emitted into the log until another
  message arrives

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
  2020-04-11 13:13   ` Paul Cercueil
@ 2020-04-14  9:31     ` Dan Carpenter
  -1 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2020-04-14  9:31 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christophe JAILLET, balbi, gregkh, linux-usb, linux-kernel,
	kernel-janitors

On Sat, Apr 11, 2020 at 03:13:47PM +0200, Paul Cercueil wrote:
> Hi Christophe,
> 
> Le sam. 11 avril 2020 à 8:38, Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> a écrit :
> > Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.
> 
> Is that so?
> 
> From what I could see these macros add the \n themselves if needed. So the
> \n were omitted on purpose.
> 

Do a "make drivers/usb/phy/phy-jz4770.i" and look at the string.  The
patch is correct.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message
@ 2020-04-14  9:31     ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2020-04-14  9:31 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Christophe JAILLET, balbi, gregkh, linux-usb, linux-kernel,
	kernel-janitors

On Sat, Apr 11, 2020 at 03:13:47PM +0200, Paul Cercueil wrote:
> Hi Christophe,
> 
> Le sam. 11 avril 2020 à 8:38, Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> a écrit :
> > Message logged by 'dev_xxx()' or 'pr_xxx()' should end with a '\n'.
> 
> Is that so?
> 
> From what I could see these macros add the \n themselves if needed. So the
> \n were omitted on purpose.
> 

Do a "make drivers/usb/phy/phy-jz4770.i" and look at the string.  The
patch is correct.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-14  9:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11  6:38 [PATCH] usb: phy: jz4770: Add a missing '\n' in a log message Christophe JAILLET
2020-04-11  6:38 ` Christophe JAILLET
2020-04-11 13:13 ` Paul Cercueil
2020-04-11 13:13   ` Paul Cercueil
2020-04-11 15:46   ` Joe Perches
2020-04-11 15:46     ` Joe Perches
2020-04-14  9:31   ` Dan Carpenter
2020-04-14  9:31     ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.