diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2014-05-02 12:22:24 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-05-07 03:41:22 +0000 |
commit | 4ba7a1502dabc4728d8e68572642dafafbd54692 (patch) | |
tree | f6183dfe771668a3c3aa77b42c3002af17dd9235 /chip | |
parent | 58c50a970ab7df4f0e3f1b188e6b1966a9d47d1d (diff) | |
download | chrome-ec-4ba7a1502dabc4728d8e68572642dafafbd54692.tar.gz |
cleanup: add square brackets to make test parser easier
This may not contain all. I filtered out possible code by the
following command:
find . -name "*.h*" -o -name "*.c*" | xargs grep -n CPRINTF | \
grep -v "\[" | grep -v define | less
BUG=none
BRANCH=none
TEST=make buildall tuntests
Change-Id: I674f84f5966b34aeb8d4321d22629b450627a120
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/197997
Diffstat (limited to 'chip')
-rw-r--r-- | chip/stm32/gpio-stm32f.c | 2 | ||||
-rw-r--r-- | chip/stm32/gpio-stm32f0.c | 2 | ||||
-rw-r--r-- | chip/stm32/gpio-stm32l.c | 2 | ||||
-rw-r--r-- | chip/stm32/i2c-stm32f.c | 14 | ||||
-rw-r--r-- | chip/stm32/i2c-stm32f0.c | 2 | ||||
-rw-r--r-- | chip/stm32/usb_pd_phy.c | 8 |
6 files changed, 16 insertions, 14 deletions
diff --git a/chip/stm32/gpio-stm32f.c b/chip/stm32/gpio-stm32f.c index eb733e470b..564ffbb56f 100644 --- a/chip/stm32/gpio-stm32f.c +++ b/chip/stm32/gpio-stm32f.c @@ -209,7 +209,7 @@ int gpio_enable_interrupt(enum gpio_signal signal) bit = 31 - __builtin_clz(g->mask); if (exti_events[bit]) { - CPRINTF("Overriding %s with %s on EXTI%d\n", + CPRINTF("[%T Overriding %s with %s on EXTI%d]\n", exti_events[bit]->name, g->name, bit); } exti_events[bit] = g; diff --git a/chip/stm32/gpio-stm32f0.c b/chip/stm32/gpio-stm32f0.c index a6d1b7b87c..0f11a65c15 100644 --- a/chip/stm32/gpio-stm32f0.c +++ b/chip/stm32/gpio-stm32f0.c @@ -210,7 +210,7 @@ int gpio_enable_interrupt(enum gpio_signal signal) bit = 31 - __builtin_clz(g->mask); if (exti_events[bit]) { - CPRINTF("Overriding %s with %s on EXTI%d\n", + CPRINTF("[%T Overriding %s with %s on EXTI%d]\n", exti_events[bit]->name, g->name, bit); } exti_events[bit] = g; diff --git a/chip/stm32/gpio-stm32l.c b/chip/stm32/gpio-stm32l.c index edc2fba652..d3aae2e31f 100644 --- a/chip/stm32/gpio-stm32l.c +++ b/chip/stm32/gpio-stm32l.c @@ -214,7 +214,7 @@ int gpio_enable_interrupt(enum gpio_signal signal) bit = 31 - __builtin_clz(g->mask); if (exti_events[bit]) { - CPRINTF("Overriding %s with %s on EXTI%d\n", + CPRINTF("[%T Overriding %s with %s on EXTI%d]\n", exti_events[bit]->name, g->name, bit); } exti_events[bit] = g; diff --git a/chip/stm32/i2c-stm32f.c b/chip/stm32/i2c-stm32f.c index 851209557b..b2d775d992 100644 --- a/chip/stm32/i2c-stm32f.c +++ b/chip/stm32/i2c-stm32f.c @@ -256,7 +256,9 @@ static void i2c_event_handler(int port) /* Confirm that you are not in master mode */ if (STM32_I2C_SR2(port) & (1 << 0)) { - CPRINTF("I2C slave ISR triggered in master mode, ignoring.\n"); + CPRINTF( + "[%T I2C slave ISR triggered in " + "master mode, ignoring]\n"); return; } @@ -314,9 +316,9 @@ static void i2c_error_handler(int port) /* ACK failed (NACK); expected when AP reads final byte. * Software must clear AF bit. */ } else { - CPRINTF("%s: I2C_SR1(%d): 0x%04x\n", + CPRINTF("[%T %s: I2C_SR1(%d): 0x%04x]\n", __func__, port, i2c_sr1[port]); - CPRINTF("%s: I2C_SR2(%d): 0x%04x\n", + CPRINTF("[%T %s: I2C_SR2(%d): 0x%04x]\n", __func__, port, STM32_I2C_SR2(port)); } @@ -550,7 +552,7 @@ static void handle_i2c_error(int port, int rv) /* EC_ERROR_TIMEOUT may have a code specifying where the timeout was */ if ((rv & 0xff) == EC_ERROR_TIMEOUT) { #ifdef CONFIG_I2C_DEBUG - CPRINTF("Wait_status() timeout type: %d\n", (rv >> 8)); + CPRINTF("[%T Wait_status() timeout type: %d]\n", (rv >> 8)); #endif rv = EC_ERROR_TIMEOUT; } @@ -572,7 +574,7 @@ static void handle_i2c_error(int port, int rv) * (Probably a stray pulse on the line got it out of sync with * the actual bytes) so reset it. */ - CPRINTF("Unable to send START, resetting i2c.\n"); + CPRINTF("[%T Unable to send START, resetting i2c]\n"); i2c_init_port(port); goto cr_cleanup; } else if (rv == EC_ERROR_TIMEOUT && !(r & 2)) { @@ -581,7 +583,7 @@ static void handle_i2c_error(int port, int rv) * It seems that this can be happen very briefly while sending * a 1. We've not actually seen this, but just to be safe. */ - CPRINTF("Bad BUSY bit detected.\n"); + CPRINTF("[%T Bad BUSY bit detected]\n"); master_stop(port); } diff --git a/chip/stm32/i2c-stm32f0.c b/chip/stm32/i2c-stm32f0.c index 1cc0c04412..3bb5419cf3 100644 --- a/chip/stm32/i2c-stm32f0.c +++ b/chip/stm32/i2c-stm32f0.c @@ -72,7 +72,7 @@ static void i2c_set_freq_port(const struct i2c_port_t *p) STM32_I2C_TIMINGR(port) = 0xB0420F13; break; default: /* unknown speed, defaults to 100kBps */ - CPRINTF("Unsupported speed %d kBps\n", p->kbps); + CPRINTF("[%T I2C bad speed %d kBps]\n", p->kbps); STM32_I2C_TIMINGR(port) = 0xB0420F13; } /* Enable port */ diff --git a/chip/stm32/usb_pd_phy.c b/chip/stm32/usb_pd_phy.c index 4a4e63b51b..bb402ee703 100644 --- a/chip/stm32/usb_pd_phy.c +++ b/chip/stm32/usb_pd_phy.c @@ -84,7 +84,7 @@ static int wait_bits(int nb) && !(STM32_TIM_SR(TIM_RX) & 4)) ; /* optimized for latency, not CPU usage ... */ if (dma_bytes_done(rx, PD_MAX_RAW_SIZE) < nb) { - CPRINTF("TMOUT RX %d/%d\n", + CPRINTF("[%T PD TMOUT RX %d/%d]\n", dma_bytes_done(rx, PD_MAX_RAW_SIZE), nb); return -1; } @@ -131,7 +131,7 @@ int pd_dequeue_bits(void *ctxt, int off, int len, uint32_t *val) return -1; } stream_err: - CPRINTF("Invalid %d @%d\n", cnt, off); + CPRINTF("[%T PD Invalid %d @%d]\n", cnt, off); return -1; } @@ -155,7 +155,7 @@ int pd_find_preamble(void *ctxt) !(STM32_TIM_SR(TIM_RX) & 4)) ; if (STM32_TIM_SR(TIM_RX) & 4) { - CPRINTF("TMOUT RX %d/%d\n", + CPRINTF("[%T PD TMOUT RX %d/%d]\n", PD_MAX_RAW_SIZE - rx->cndtr, bit); return -1; } @@ -524,7 +524,7 @@ void *pd_hw_init(void) STM32_EXTI_IMR |= EXTI_COMP_MASK; task_enable_irq(IRQ_COMP); - CPRINTF("USB PD initialized\n"); + CPRINTF("[%T USB PD initialized]\n"); return raw_samples; } |