usb: typec: tcpci_maxim: add terminating newlines to logging
Add terminating '\n' to the formats where missed. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Junlin Yang <yangjunlin@yulong.com> Link: https://lore.kernel.org/r/20210124143947.1688-1-angkery@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a63b53e19b
commit
7cbcd008e1
|
@ -155,7 +155,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);
|
ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, 2);
|
||||||
if (ret < 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,13 +164,13 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
|
||||||
|
|
||||||
if (count == 0 || frame_type != TCPC_RX_BUF_FRAME_TYPE_SOP) {
|
if (count == 0 || frame_type != TCPC_RX_BUF_FRAME_TYPE_SOP) {
|
||||||
max_tcpci_write16(chip, TCPC_ALERT, TCPC_ALERT_RX_STATUS);
|
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");
|
"error frame_type is not SOP");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > sizeof(struct pd_message) || count + 1 > TCPC_RECEIVE_BUFFER_LEN) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ static void process_rx(struct max_tcpci_chip *chip, u16 status)
|
||||||
count += 1;
|
count += 1;
|
||||||
ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, count);
|
ret = regmap_raw_read(chip->data.regmap, TCPC_RX_BYTE_CNT, rx_buf, count);
|
||||||
if (ret < 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ static irqreturn_t _max_tcpci_irq(struct max_tcpci_chip *chip, u16 status)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (reg_status & TCPC_SINK_FAST_ROLE_SWAP) {
|
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);
|
tcpm_sink_frs(chip->port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@ static int max_tcpci_probe(struct i2c_client *client, const struct i2c_device_id
|
||||||
max_tcpci_init_regs(chip);
|
max_tcpci_init_regs(chip);
|
||||||
chip->tcpci = tcpci_register_port(chip->dev, &chip->data);
|
chip->tcpci = tcpci_register_port(chip->dev, &chip->data);
|
||||||
if (IS_ERR(chip->tcpci)) {
|
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);
|
return PTR_ERR(chip->tcpci);
|
||||||
}
|
}
|
||||||
chip->port = tcpci_get_tcpm_port(chip->tcpci);
|
chip->port = tcpci_get_tcpm_port(chip->tcpci);
|
||||||
|
|
Loading…
Reference in New Issue