summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2019-06-17 13:08:06 +0800
committerCommit Bot <commit-bot@chromium.org>2019-06-20 05:52:11 +0000
commitb16b36b94989a0d8e0f2268099f91094668c70f9 (patch)
treece9f912e6dbb0ed05cfb958f21e1ff67a7898292 /chip
parentbbe3abd8dbee0a91b5bfad214821768610b10371 (diff)
downloadchrome-ec-b16b36b94989a0d8e0f2268099f91094668c70f9.tar.gz
ec: Remove extraneous new line as the end of CPRINTS strings
CPRINTS already prints a new line, no need to add another one. Spotted during boot on kukui, and then realized there are many more instances: "" [3.689239 Module 7 is not supported for clock disable ] "" BRANCH=none BUG=none TEST=make buildall -j TEST=`git grep CPRINTS | grep "\\\\n\""` shows nothing of interest. Change-Id: I4d2bbbc65a91fa56c6e6115aa5c353bfd2b384a1 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660519 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/ish/i2c.c2
-rw-r--r--chip/ish/ipc_heci.c16
-rw-r--r--chip/it83xx/i2c_slave.c2
-rw-r--r--chip/mchp/i2c.c2
-rw-r--r--chip/npcx/hwtimer.c2
-rw-r--r--chip/npcx/i2c.c2
-rw-r--r--chip/nrf51/bluetooth_le.c2
-rw-r--r--chip/stm32/clock-stm32f0.c2
-rw-r--r--chip/stm32/clock-stm32f4.c2
9 files changed, 16 insertions, 16 deletions
diff --git a/chip/ish/i2c.c b/chip/ish/i2c.c
index 0cb445cea0..9099c983b9 100644
--- a/chip/ish/i2c.c
+++ b/chip/ish/i2c.c
@@ -439,7 +439,7 @@ static void i2c_interrupt_handler(struct i2c_context *ctx)
if (IS_ENABLED(INTR_DEBUG))
CPRINTS("INTR_STAT = 0x%04x, TX_ABORT_SRC = 0x%04x, "
- "RAW_INTR_STAT = 0x%04x\n",
+ "RAW_INTR_STAT = 0x%04x",
ctx->interrupts, ctx->reason, raw_intr);
/* disable interrupts */
diff --git a/chip/ish/ipc_heci.c b/chip/ish/ipc_heci.c
index 1eb3e7da4d..9e62c33520 100644
--- a/chip/ish/ipc_heci.c
+++ b/chip/ish/ipc_heci.c
@@ -234,7 +234,7 @@ static int ipc_write_raw_timestamp(struct ipc_if_ctx *ctx, uint32_t drbl,
memcpy(msg->payload, payload, payload_size);
queue_advance_tail(q, 1);
} else {
- CPRINTS("tx queue is full\n");
+ CPRINTS("tx queue is full");
res = -IPC_ERR_TX_QUEUE_FULL;
}
@@ -301,7 +301,7 @@ static int ipc_get_protocol_data(const struct ipc_if_ctx *ctx,
payload_size = IPC_DB_MSG_LENGTH(drbl_val);
if (payload_size > IPC_MAX_PAYLOAD_SIZE) {
- CPRINTS("invalid msg : payload is too big\n");
+ CPRINTS("invalid msg : payload is too big");
return -IPC_ERR_INVALID_MSG;
}
@@ -315,12 +315,12 @@ static int ipc_get_protocol_data(const struct ipc_if_ctx *ctx,
len = payload_size + sizeof(drbl_val);
break;
default:
- CPRINTS("protocol %d not supported yet\n", protocol);
+ CPRINTS("protocol %d not supported yet", protocol);
break;
}
if (len > buf_size) {
- CPRINTS("buffer is smaller than payload\n");
+ CPRINTS("buffer is smaller than payload");
return -IPC_ERR_TOO_SMALL_BUFFER;
}
@@ -492,12 +492,12 @@ int ipc_write_timestamp(const ipc_handle_t handle, const void *buf,
ctx = ipc_handle_to_if_ctx(handle);
if (ctx->initialized == 0) {
- CPRINTS("open_ipc() for the peer is never called\n");
+ CPRINTS("open_ipc() for the peer is never called");
return -EC_ERROR_INVAL;
}
if (!ctx->msg_events[protocol].enabled) {
- CPRINTS("call open_ipc() for the protocol first\n");
+ CPRINTS("call open_ipc() for the protocol first");
return -EC_ERROR_INVAL;
}
@@ -587,7 +587,7 @@ static void handle_mng_commands(const ipc_handle_t handle,
case MNG_RX_CMPL_DISABLE:
case MNG_RX_CMPL_INDICATION:
case MNG_RESET_NOTIFY:
- CPRINTS("msg not handled %d\n", IPC_DB_CMD(msg->drbl));
+ CPRINTS("msg not handled %d", IPC_DB_CMD(msg->drbl));
break;
case MNG_RESET_NOTIFY_ACK:
ipc_rst = (struct ipc_rst_payload *)msg->payload;
@@ -710,7 +710,7 @@ void ipc_mng_task(void)
/* allow doorbell with any payload */
if (payload_size < 0) {
- CPRINTS("ipc_read error. discard msg\n");
+ CPRINTS("ipc_read error. discard msg");
continue; /* TODO: retry several and exit */
}
diff --git a/chip/it83xx/i2c_slave.c b/chip/it83xx/i2c_slave.c
index 066ea6334a..bce86d25b8 100644
--- a/chip/it83xx/i2c_slave.c
+++ b/chip/it83xx/i2c_slave.c
@@ -173,7 +173,7 @@ void i2c_slave_read_write_data(int port)
* TODO(b:129360157): Handle master write
* data by "in_data" array.
*/
- CPRINTS("WData: %.*h\n",
+ CPRINTS("WData: %.*h",
I2C_MAX_BUFFER_SIZE, in_data[idx]);
wr_done[idx] = 0;
}
diff --git a/chip/mchp/i2c.c b/chip/mchp/i2c.c
index f47f209947..489d374195 100644
--- a/chip/mchp/i2c.c
+++ b/chip/mchp/i2c.c
@@ -501,7 +501,7 @@ static int i2c_check_recover(int port, int controller)
if ((((reg & (STS_BER | STS_LAB)) || !(reg & STS_NBB)) ||
(lines != I2C_LINE_IDLE))) {
cdata[controller].flags |= (1ul << 16);
- CPRINTS("I2C%d port%d recov status 0x%02x, SDA:SCL=0x%0x\n",
+ CPRINTS("I2C%d port%d recov status 0x%02x, SDA:SCL=0x%0x",
controller, port, reg, lines);
/* Attempt to unwedge the port. */
if (lines != I2C_LINE_IDLE)
diff --git a/chip/npcx/hwtimer.c b/chip/npcx/hwtimer.c
index 26f4856508..f4c47daf33 100644
--- a/chip/npcx/hwtimer.c
+++ b/chip/npcx/hwtimer.c
@@ -89,7 +89,7 @@ void __hw_clock_event_set(uint32_t deadline)
*/
evt_cnt = FP_TO_INT((fp_inter_t)(evt_cnt_us) * inv_evt_tick);
if (evt_cnt > TICK_EVT_MAX_CNT) {
- CPRINTS("Event overflow! 0x%08x, us is %d\r\n",
+ CPRINTS("Event overflow! 0x%08x, us is %d",
evt_cnt, evt_cnt_us);
evt_cnt = TICK_EVT_MAX_CNT;
}
diff --git a/chip/npcx/i2c.c b/chip/npcx/i2c.c
index 0b726cb2bf..0b99f24270 100644
--- a/chip/npcx/i2c.c
+++ b/chip/npcx/i2c.c
@@ -675,7 +675,7 @@ int chip_i2c_xfer(int port, int slave_addr, const uint8_t *out, int out_size,
/* Reset task ID */
p_status->task_waiting = TASK_ID_INVALID;
- CPRINTS("-Err:0x%02x\n", p_status->err_code);
+ CPRINTS("-Err:0x%02x", p_status->err_code);
return (p_status->err_code == SMB_OK) ? EC_SUCCESS : EC_ERROR_UNKNOWN;
}
diff --git a/chip/nrf51/bluetooth_le.c b/chip/nrf51/bluetooth_le.c
index f4747cf83e..1c18a8a84f 100644
--- a/chip/nrf51/bluetooth_le.c
+++ b/chip/nrf51/bluetooth_le.c
@@ -513,7 +513,7 @@ static int command_ble_adv_scan(int argc, char **argv)
CPRINTS("ADV Listen");
if (addr_lsbyte != -1)
- CPRINTS("filtered (%x)\n", addr_lsbyte);
+ CPRINTS("filtered (%x)", addr_lsbyte);
for (i = 0; i < packets; i++) {
rv = ble_rx(&rcv_packet, 1000000, 1);
diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c
index 32d77e8fce..2e7937514e 100644
--- a/chip/stm32/clock-stm32f0.c
+++ b/chip/stm32/clock-stm32f0.c
@@ -427,7 +427,7 @@ void clock_enable_module(enum module_id module, int enable)
return;
}
- CPRINTS("Module %d is not supported for clock %s\n",
+ CPRINTS("Module %d is not supported for clock %s",
module, enable ? "enable" : "disable");
}
diff --git a/chip/stm32/clock-stm32f4.c b/chip/stm32/clock-stm32f4.c
index 8dbfd2fcca..5c92ab7725 100644
--- a/chip/stm32/clock-stm32f4.c
+++ b/chip/stm32/clock-stm32f4.c
@@ -235,7 +235,7 @@ void clock_enable_module(enum module_id module, int enable)
return;
}
- CPRINTS("Module %d is not supported for clock %s\n",
+ CPRINTS("Module %d is not supported for clock %s",
module, enable ? "enable" : "disable");
}