All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 2/2] usb: typec: tcpci_maxim: add terminating newlines to logging
@ 2021-01-24 14:39 angkery
  2021-01-24 15:43 ` Guenter Roeck
  2021-01-25  9:33 ` Heikki Krogerus
  0 siblings, 2 replies; 3+ messages in thread
From: angkery @ 2021-01-24 14:39 UTC (permalink / raw)
  To: linux, heikki.krogerus, gregkh; +Cc: linux-usb, linux-kernel, Junlin Yang

From: Junlin Yang <yangjunlin@yulong.com>

Add terminating '\n' to the formats where missed.

Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
---
v3:Modify it again and submit it separately from patch 1.

 drivers/usb/typec/tcpm/tcpci_maxim.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
index 7f54f51a..5d7463c 100644
--- a/drivers/usb/typec/tcpm/tcpci_maxim.c
+++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
@@ -158,7 +158,7 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
 	 */
 	ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, 2);
 	if (ret < 0) {
-		dev_err(chip->dev, "TCPC_RX_BYTE_CNT read failed ret:%d", ret);
+		dev_err(chip->dev, "TCPC_RX_BYTE_CNT read failed ret:%d\n", ret);
 		return;
 	}
 
@@ -167,13 +167,13 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
 
 	if (count == 0 || frame_type != TCPC_RX_BUF_FRAME_TYPE_SOP) {
 		max_tcpci_write16(chip, TCPC_ALERT, TCPC_ALERT_RX_STATUS);
-		dev_err(chip->dev, "%s", count ==  0 ? "error: count is 0" :
+		dev_err(chip->dev, "%s\n", count ==  0 ? "error: count is 0" :
 			"error frame_type is not SOP");
 		return;
 	}
 
 	if (count > sizeof(struct pd_message) || count + 1 > TCPC_RECEIVE_BUFFER_LEN) {
-		dev_err(chip->dev, "Invalid TCPC_RX_BYTE_CNT %d", count);
+		dev_err(chip->dev, "Invalid TCPC_RX_BYTE_CNT %d\n", count);
 		return;
 	}
 
@@ -184,7 +184,7 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
 	count += 1;
 	ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, count);
 	if (ret < 0) {
-		dev_err(chip->dev, "Error: TCPC_RX_BYTE_CNT read failed: %d", ret);
+		dev_err(chip->dev, "Error: TCPC_RX_BYTE_CNT read failed: %d\n", ret);
 		return;
 	}
 
@@ -317,7 +317,7 @@ static irqreturn_t _max_tcpci_irq(struct max_tcpci_chip *chip, u16 status)
 			return ret;
 
 		if (reg_status & TCPC_SINK_FAST_ROLE_SWAP) {
-			dev_info(chip->dev, "FRS Signal");
+			dev_info(chip->dev, "FRS Signal\n");
 			tcpm_sink_frs(chip->port);
 		}
 	}
@@ -460,7 +460,7 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id
 	max_tcpci_init_regs(chip);
 	chip->tcpci = tcpci_register_port(chip->dev, &chip->data);
 	if (IS_ERR(chip->tcpci)) {
-		dev_err(&client->dev, "TCPCI port registration failed");
+		dev_err(&client->dev, "TCPCI port registration failed\n");
 		return PTR_ERR(chip->tcpci);
 	}
 	chip->port = tcpci_get_tcpm_port(chip->tcpci);
-- 
1.9.1


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

* Re: [PATCH v3 2/2] usb: typec: tcpci_maxim: add terminating newlines to logging
  2021-01-24 14:39 [PATCH v3 2/2] usb: typec: tcpci_maxim: add terminating newlines to logging angkery
@ 2021-01-24 15:43 ` Guenter Roeck
  2021-01-25  9:33 ` Heikki Krogerus
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2021-01-24 15:43 UTC (permalink / raw)
  To: angkery; +Cc: heikki.krogerus, gregkh, linux-usb, linux-kernel, Junlin Yang

On Sun, Jan 24, 2021 at 10:39:47PM +0800, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
> 
> Add terminating '\n' to the formats where missed.
> 
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> v3:Modify it again and submit it separately from patch 1.
> 
>  drivers/usb/typec/tcpm/tcpci_maxim.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
> index 7f54f51a..5d7463c 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
> @@ -158,7 +158,7 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
>  	 */
>  	ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, 2);
>  	if (ret < 0) {
> -		dev_err(chip->dev, "TCPC_RX_BYTE_CNT read failed ret:%d", ret);
> +		dev_err(chip->dev, "TCPC_RX_BYTE_CNT read failed ret:%d\n", ret);
>  		return;
>  	}
>  
> @@ -167,13 +167,13 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
>  
>  	if (count == 0 || frame_type != TCPC_RX_BUF_FRAME_TYPE_SOP) {
>  		max_tcpci_write16(chip, TCPC_ALERT, TCPC_ALERT_RX_STATUS);
> -		dev_err(chip->dev, "%s", count ==  0 ? "error: count is 0" :
> +		dev_err(chip->dev, "%s\n", count ==  0 ? "error: count is 0" :
>  			"error frame_type is not SOP");
>  		return;
>  	}
>  
>  	if (count > sizeof(struct pd_message) || count + 1 > TCPC_RECEIVE_BUFFER_LEN) {
> -		dev_err(chip->dev, "Invalid TCPC_RX_BYTE_CNT %d", count);
> +		dev_err(chip->dev, "Invalid TCPC_RX_BYTE_CNT %d\n", count);
>  		return;
>  	}
>  
> @@ -184,7 +184,7 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
>  	count += 1;
>  	ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, count);
>  	if (ret < 0) {
> -		dev_err(chip->dev, "Error: TCPC_RX_BYTE_CNT read failed: %d", ret);
> +		dev_err(chip->dev, "Error: TCPC_RX_BYTE_CNT read failed: %d\n", ret);
>  		return;
>  	}
>  
> @@ -317,7 +317,7 @@ static irqreturn_t _max_tcpci_irq(struct max_tcpci_chip *chip, u16 status)
>  			return ret;
>  
>  		if (reg_status & TCPC_SINK_FAST_ROLE_SWAP) {
> -			dev_info(chip->dev, "FRS Signal");
> +			dev_info(chip->dev, "FRS Signal\n");
>  			tcpm_sink_frs(chip->port);
>  		}
>  	}
> @@ -460,7 +460,7 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id
>  	max_tcpci_init_regs(chip);
>  	chip->tcpci = tcpci_register_port(chip->dev, &chip->data);
>  	if (IS_ERR(chip->tcpci)) {
> -		dev_err(&client->dev, "TCPCI port registration failed");
> +		dev_err(&client->dev, "TCPCI port registration failed\n");
>  		return PTR_ERR(chip->tcpci);
>  	}
>  	chip->port = tcpci_get_tcpm_port(chip->tcpci);
> -- 
> 1.9.1
> 

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

* Re: [PATCH v3 2/2] usb: typec: tcpci_maxim: add terminating newlines to logging
  2021-01-24 14:39 [PATCH v3 2/2] usb: typec: tcpci_maxim: add terminating newlines to logging angkery
  2021-01-24 15:43 ` Guenter Roeck
@ 2021-01-25  9:33 ` Heikki Krogerus
  1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2021-01-25  9:33 UTC (permalink / raw)
  To: angkery; +Cc: linux, gregkh, linux-usb, linux-kernel, Junlin Yang

On Sun, Jan 24, 2021 at 10:39:47PM +0800, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
> 
> Add terminating '\n' to the formats where missed.
> 
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
> v3:Modify it again and submit it separately from patch 1.
> 
>  drivers/usb/typec/tcpm/tcpci_maxim.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
> index 7f54f51a..5d7463c 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
> @@ -158,7 +158,7 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
>  	 */
>  	ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, 2);
>  	if (ret < 0) {
> -		dev_err(chip->dev, "TCPC_RX_BYTE_CNT read failed ret:%d", ret);
> +		dev_err(chip->dev, "TCPC_RX_BYTE_CNT read failed ret:%d\n", ret);
>  		return;
>  	}
>  
> @@ -167,13 +167,13 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
>  
>  	if (count == 0 || frame_type != TCPC_RX_BUF_FRAME_TYPE_SOP) {
>  		max_tcpci_write16(chip, TCPC_ALERT, TCPC_ALERT_RX_STATUS);
> -		dev_err(chip->dev, "%s", count ==  0 ? "error: count is 0" :
> +		dev_err(chip->dev, "%s\n", count ==  0 ? "error: count is 0" :
>  			"error frame_type is not SOP");
>  		return;
>  	}
>  
>  	if (count > sizeof(struct pd_message) || count + 1 > TCPC_RECEIVE_BUFFER_LEN) {
> -		dev_err(chip->dev, "Invalid TCPC_RX_BYTE_CNT %d", count);
> +		dev_err(chip->dev, "Invalid TCPC_RX_BYTE_CNT %d\n", count);
>  		return;
>  	}
>  
> @@ -184,7 +184,7 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
>  	count += 1;
>  	ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, count);
>  	if (ret < 0) {
> -		dev_err(chip->dev, "Error: TCPC_RX_BYTE_CNT read failed: %d", ret);
> +		dev_err(chip->dev, "Error: TCPC_RX_BYTE_CNT read failed: %d\n", ret);
>  		return;
>  	}
>  
> @@ -317,7 +317,7 @@ static irqreturn_t _max_tcpci_irq(struct max_tcpci_chip *chip, u16 status)
>  			return ret;
>  
>  		if (reg_status & TCPC_SINK_FAST_ROLE_SWAP) {
> -			dev_info(chip->dev, "FRS Signal");
> +			dev_info(chip->dev, "FRS Signal\n");
>  			tcpm_sink_frs(chip->port);
>  		}
>  	}
> @@ -460,7 +460,7 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id
>  	max_tcpci_init_regs(chip);
>  	chip->tcpci = tcpci_register_port(chip->dev, &chip->data);
>  	if (IS_ERR(chip->tcpci)) {
> -		dev_err(&client->dev, "TCPCI port registration failed");
> +		dev_err(&client->dev, "TCPCI port registration failed\n");
>  		return PTR_ERR(chip->tcpci);
>  	}
>  	chip->port = tcpci_get_tcpm_port(chip->tcpci);
> -- 
> 1.9.1

thanks,

-- 
heikki

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

end of thread, other threads:[~2021-01-26 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 14:39 [PATCH v3 2/2] usb: typec: tcpci_maxim: add terminating newlines to logging angkery
2021-01-24 15:43 ` Guenter Roeck
2021-01-25  9:33 ` Heikki Krogerus

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.