linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: wilco_ec: Add newlines to printks
@ 2020-01-22  0:40 Stephen Boyd
  2020-01-23 19:47 ` Benson Leung
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2020-01-22  0:40 UTC (permalink / raw)
  To: Benson Leung, Enric Balletbo i Serra
  Cc: linux-kernel, Nick Crews, Daniel Campello

printk messages all require newlines, or it looks very odd in the log
when messages are not on different lines. Add them.

Cc: Nick Crews <ncrews@chromium.org>
Cc: Daniel Campello <campello@chromium.org>
Cc: Daniel Campello <campello@chromium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/platform/chrome/wilco_ec/core.c          | 2 +-
 drivers/platform/chrome/wilco_ec/keyboard_leds.c | 8 ++++----
 drivers/platform/chrome/wilco_ec/mailbox.c       | 4 ++--
 drivers/platform/chrome/wilco_ec/telemetry.c     | 6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c
index 2d5f027d8770..5b42992bff38 100644
--- a/drivers/platform/chrome/wilco_ec/core.c
+++ b/drivers/platform/chrome/wilco_ec/core.c
@@ -94,7 +94,7 @@ static int wilco_ec_probe(struct platform_device *pdev)
 
 	ret = wilco_ec_add_sysfs(ec);
 	if (ret < 0) {
-		dev_err(dev, "Failed to create sysfs entries: %d", ret);
+		dev_err(dev, "Failed to create sysfs entries: %d\n", ret);
 		goto unregister_rtc;
 	}
 
diff --git a/drivers/platform/chrome/wilco_ec/keyboard_leds.c b/drivers/platform/chrome/wilco_ec/keyboard_leds.c
index 5731d1b60e28..6ce9c6782065 100644
--- a/drivers/platform/chrome/wilco_ec/keyboard_leds.c
+++ b/drivers/platform/chrome/wilco_ec/keyboard_leds.c
@@ -69,7 +69,7 @@ static int send_kbbl_msg(struct wilco_ec_device *ec,
 	ret = wilco_ec_mailbox(ec, &msg);
 	if (ret < 0) {
 		dev_err(ec->dev,
-			"Failed sending keyboard LEDs command: %d", ret);
+			"Failed sending keyboard LEDs command: %d\n", ret);
 		return ret;
 	}
 
@@ -94,7 +94,7 @@ static int set_kbbl(struct wilco_ec_device *ec, enum led_brightness brightness)
 
 	if (response.status) {
 		dev_err(ec->dev,
-			"EC reported failure sending keyboard LEDs command: %d",
+			"EC reported failure sending keyboard LEDs command: %d\n",
 			response.status);
 		return -EIO;
 	}
@@ -147,7 +147,7 @@ static int kbbl_init(struct wilco_ec_device *ec)
 
 	if (response.status) {
 		dev_err(ec->dev,
-			"EC reported failure sending keyboard LEDs command: %d",
+			"EC reported failure sending keyboard LEDs command: %d\n",
 			response.status);
 		return -EIO;
 	}
@@ -179,7 +179,7 @@ int wilco_keyboard_leds_init(struct wilco_ec_device *ec)
 	ret = kbbl_exist(ec, &leds_exist);
 	if (ret < 0) {
 		dev_err(ec->dev,
-			"Failed checking keyboard LEDs support: %d", ret);
+			"Failed checking keyboard LEDs support: %d\n", ret);
 		return ret;
 	}
 	if (!leds_exist)
diff --git a/drivers/platform/chrome/wilco_ec/mailbox.c b/drivers/platform/chrome/wilco_ec/mailbox.c
index ced1f9f3dcee..0f98358ea824 100644
--- a/drivers/platform/chrome/wilco_ec/mailbox.c
+++ b/drivers/platform/chrome/wilco_ec/mailbox.c
@@ -163,13 +163,13 @@ static int wilco_ec_transfer(struct wilco_ec_device *ec,
 	}
 
 	if (rs->data_size != EC_MAILBOX_DATA_SIZE) {
-		dev_dbg(ec->dev, "unexpected packet size (%u != %u)",
+		dev_dbg(ec->dev, "unexpected packet size (%u != %u)\n",
 			rs->data_size, EC_MAILBOX_DATA_SIZE);
 		return -EMSGSIZE;
 	}
 
 	if (rs->data_size < msg->response_size) {
-		dev_dbg(ec->dev, "EC didn't return enough data (%u < %zu)",
+		dev_dbg(ec->dev, "EC didn't return enough data (%u < %zu)\n",
 			rs->data_size, msg->response_size);
 		return -EMSGSIZE;
 	}
diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c b/drivers/platform/chrome/wilco_ec/telemetry.c
index 1176d543191a..e06d96fb9426 100644
--- a/drivers/platform/chrome/wilco_ec/telemetry.c
+++ b/drivers/platform/chrome/wilco_ec/telemetry.c
@@ -367,7 +367,7 @@ static int telem_device_probe(struct platform_device *pdev)
 	minor = ida_alloc_max(&telem_ida, TELEM_MAX_DEV-1, GFP_KERNEL);
 	if (minor < 0) {
 		error = minor;
-		dev_err(&pdev->dev, "Failed to find minor number: %d", error);
+		dev_err(&pdev->dev, "Failed to find minor number: %d\n", error);
 		return error;
 	}
 
@@ -427,14 +427,14 @@ static int __init telem_module_init(void)
 
 	ret = class_register(&telem_class);
 	if (ret) {
-		pr_err(DRV_NAME ": Failed registering class: %d", ret);
+		pr_err(DRV_NAME ": Failed registering class: %d\n", ret);
 		return ret;
 	}
 
 	/* Request the kernel for device numbers, starting with minor=0 */
 	ret = alloc_chrdev_region(&dev_num, 0, TELEM_MAX_DEV, TELEM_DEV_NAME);
 	if (ret) {
-		pr_err(DRV_NAME ": Failed allocating dev numbers: %d", ret);
+		pr_err(DRV_NAME ": Failed allocating dev numbers: %d\n", ret);
 		goto destroy_class;
 	}
 	telem_major = MAJOR(dev_num);
-- 
Sent by a computer, using git, on the internet


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

* Re: [PATCH] platform/chrome: wilco_ec: Add newlines to printks
  2020-01-22  0:40 [PATCH] platform/chrome: wilco_ec: Add newlines to printks Stephen Boyd
@ 2020-01-23 19:47 ` Benson Leung
  0 siblings, 0 replies; 2+ messages in thread
From: Benson Leung @ 2020-01-23 19:47 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Benson Leung, Enric Balletbo i Serra, linux-kernel, Nick Crews,
	Daniel Campello

[-- Attachment #1: Type: text/plain, Size: 5240 bytes --]

Hi Stephen,

On Tue, Jan 21, 2020 at 04:40:32PM -0800, Stephen Boyd wrote:
> printk messages all require newlines, or it looks very odd in the log
> when messages are not on different lines. Add them.
> 
> Cc: Nick Crews <ncrews@chromium.org>
> Cc: Daniel Campello <campello@chromium.org>
> Cc: Daniel Campello <campello@chromium.org>
> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

Applied to our for-next. Thanks!

> ---
>  drivers/platform/chrome/wilco_ec/core.c          | 2 +-
>  drivers/platform/chrome/wilco_ec/keyboard_leds.c | 8 ++++----
>  drivers/platform/chrome/wilco_ec/mailbox.c       | 4 ++--
>  drivers/platform/chrome/wilco_ec/telemetry.c     | 6 +++---
>  4 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c
> index 2d5f027d8770..5b42992bff38 100644
> --- a/drivers/platform/chrome/wilco_ec/core.c
> +++ b/drivers/platform/chrome/wilco_ec/core.c
> @@ -94,7 +94,7 @@ static int wilco_ec_probe(struct platform_device *pdev)
>  
>  	ret = wilco_ec_add_sysfs(ec);
>  	if (ret < 0) {
> -		dev_err(dev, "Failed to create sysfs entries: %d", ret);
> +		dev_err(dev, "Failed to create sysfs entries: %d\n", ret);
>  		goto unregister_rtc;
>  	}
>  
> diff --git a/drivers/platform/chrome/wilco_ec/keyboard_leds.c b/drivers/platform/chrome/wilco_ec/keyboard_leds.c
> index 5731d1b60e28..6ce9c6782065 100644
> --- a/drivers/platform/chrome/wilco_ec/keyboard_leds.c
> +++ b/drivers/platform/chrome/wilco_ec/keyboard_leds.c
> @@ -69,7 +69,7 @@ static int send_kbbl_msg(struct wilco_ec_device *ec,
>  	ret = wilco_ec_mailbox(ec, &msg);
>  	if (ret < 0) {
>  		dev_err(ec->dev,
> -			"Failed sending keyboard LEDs command: %d", ret);
> +			"Failed sending keyboard LEDs command: %d\n", ret);
>  		return ret;
>  	}
>  
> @@ -94,7 +94,7 @@ static int set_kbbl(struct wilco_ec_device *ec, enum led_brightness brightness)
>  
>  	if (response.status) {
>  		dev_err(ec->dev,
> -			"EC reported failure sending keyboard LEDs command: %d",
> +			"EC reported failure sending keyboard LEDs command: %d\n",
>  			response.status);
>  		return -EIO;
>  	}
> @@ -147,7 +147,7 @@ static int kbbl_init(struct wilco_ec_device *ec)
>  
>  	if (response.status) {
>  		dev_err(ec->dev,
> -			"EC reported failure sending keyboard LEDs command: %d",
> +			"EC reported failure sending keyboard LEDs command: %d\n",
>  			response.status);
>  		return -EIO;
>  	}
> @@ -179,7 +179,7 @@ int wilco_keyboard_leds_init(struct wilco_ec_device *ec)
>  	ret = kbbl_exist(ec, &leds_exist);
>  	if (ret < 0) {
>  		dev_err(ec->dev,
> -			"Failed checking keyboard LEDs support: %d", ret);
> +			"Failed checking keyboard LEDs support: %d\n", ret);
>  		return ret;
>  	}
>  	if (!leds_exist)
> diff --git a/drivers/platform/chrome/wilco_ec/mailbox.c b/drivers/platform/chrome/wilco_ec/mailbox.c
> index ced1f9f3dcee..0f98358ea824 100644
> --- a/drivers/platform/chrome/wilco_ec/mailbox.c
> +++ b/drivers/platform/chrome/wilco_ec/mailbox.c
> @@ -163,13 +163,13 @@ static int wilco_ec_transfer(struct wilco_ec_device *ec,
>  	}
>  
>  	if (rs->data_size != EC_MAILBOX_DATA_SIZE) {
> -		dev_dbg(ec->dev, "unexpected packet size (%u != %u)",
> +		dev_dbg(ec->dev, "unexpected packet size (%u != %u)\n",
>  			rs->data_size, EC_MAILBOX_DATA_SIZE);
>  		return -EMSGSIZE;
>  	}
>  
>  	if (rs->data_size < msg->response_size) {
> -		dev_dbg(ec->dev, "EC didn't return enough data (%u < %zu)",
> +		dev_dbg(ec->dev, "EC didn't return enough data (%u < %zu)\n",
>  			rs->data_size, msg->response_size);
>  		return -EMSGSIZE;
>  	}
> diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c b/drivers/platform/chrome/wilco_ec/telemetry.c
> index 1176d543191a..e06d96fb9426 100644
> --- a/drivers/platform/chrome/wilco_ec/telemetry.c
> +++ b/drivers/platform/chrome/wilco_ec/telemetry.c
> @@ -367,7 +367,7 @@ static int telem_device_probe(struct platform_device *pdev)
>  	minor = ida_alloc_max(&telem_ida, TELEM_MAX_DEV-1, GFP_KERNEL);
>  	if (minor < 0) {
>  		error = minor;
> -		dev_err(&pdev->dev, "Failed to find minor number: %d", error);
> +		dev_err(&pdev->dev, "Failed to find minor number: %d\n", error);
>  		return error;
>  	}
>  
> @@ -427,14 +427,14 @@ static int __init telem_module_init(void)
>  
>  	ret = class_register(&telem_class);
>  	if (ret) {
> -		pr_err(DRV_NAME ": Failed registering class: %d", ret);
> +		pr_err(DRV_NAME ": Failed registering class: %d\n", ret);
>  		return ret;
>  	}
>  
>  	/* Request the kernel for device numbers, starting with minor=0 */
>  	ret = alloc_chrdev_region(&dev_num, 0, TELEM_MAX_DEV, TELEM_DEV_NAME);
>  	if (ret) {
> -		pr_err(DRV_NAME ": Failed allocating dev numbers: %d", ret);
> +		pr_err(DRV_NAME ": Failed allocating dev numbers: %d\n", ret);
>  		goto destroy_class;
>  	}
>  	telem_major = MAJOR(dev_num);
> -- 
> Sent by a computer, using git, on the internet
> 

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2020-01-23 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22  0:40 [PATCH] platform/chrome: wilco_ec: Add newlines to printks Stephen Boyd
2020-01-23 19:47 ` Benson Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).