diff options
author | Anton Staaf <robotboy@chromium.org> | 2014-07-01 08:51:58 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-07-03 02:52:35 +0000 |
commit | 2ebf92a0a84e259d86b7c29bed753ca068913aed (patch) | |
tree | beda3d52e3a8e9e0c4d53bd73251448afdf34950 | |
parent | c288fcf281d50af3f06808e67bf09d0bab67ec55 (diff) | |
download | chrome-ec-2ebf92a0a84e259d86b7c29bed753ca068913aed.tar.gz |
cprints: Revert some changes from CPRINTF to CPRINTS
These changes were made in files that did not have the [%T ... ]
pattern. These files were broken by the change because they still
contained uses of the CPRINTF macro. There were two options to fix
this, switch to the CPRINTS macro and get the timestamp added to
these strings, or switch those files back to defining the CPRINTF
macro. Switching back seems like the right thing since it doesn't
change the output of those debug messages.
This commit also adds newline termination to a few invocations of
CPRINTF that were missing it, but obviously wanted it.
This breakage is only visible with a particular set of CONFIG_
defines that no boards currently use.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=none
TEST=make buildall -j
Change-Id: I784b52dc385b29f05d7b9bc1521e37597409153b
Reviewed-on: https://chromium-review.googlesource.com/206281
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
-rw-r--r-- | chip/stm32/dma.c | 2 | ||||
-rw-r--r-- | driver/accel_kxcj9.c | 4 | ||||
-rw-r--r-- | driver/charger/bq24192.c | 6 | ||||
-rw-r--r-- | driver/regulator_ir357x.c | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/chip/stm32/dma.c b/chip/stm32/dma.c index 735ffbd326..e648b7418e 100644 --- a/chip/stm32/dma.c +++ b/chip/stm32/dma.c @@ -14,7 +14,7 @@ /* Console output macros */ #define CPUTS(outstr) cputs(CC_DMA, outstr) -#define CPRINTS(format, args...) cprints(CC_DMA, format, ## args) +#define CPRINTF(format, args...) cprintf(CC_DMA, format, ## args) /* Task IDs for the interrupt handlers to wake up */ static task_id_t id[STM32_DMAC_COUNT]; diff --git a/driver/accel_kxcj9.c b/driver/accel_kxcj9.c index f11339c5b4..1dc491151b 100644 --- a/driver/accel_kxcj9.c +++ b/driver/accel_kxcj9.c @@ -16,7 +16,7 @@ #include "util.h" #define CPUTS(outstr) cputs(CC_ACCEL, outstr) -#define CPRINTS(format, args...) cprints(CC_ACCEL, format, ## args) +#define CPRINTF(format, args...) cprintf(CC_ACCEL, format, ## args) /* Number of times to attempt to enable sensor before giving up. */ #define SENSOR_ENABLE_ATTEMPTS 3 @@ -191,7 +191,7 @@ static int enable_sensor(const enum accel_id id, const int ctrl1) mutex_unlock(&accel_mutex[id]); /* Cannot enable accel, print warning and return an error. */ - CPRINTF("Error trying to enable accelerometer %d", id); + CPRINTF("Error trying to enable accelerometer %d\n", id); return ret; } diff --git a/driver/charger/bq24192.c b/driver/charger/bq24192.c index 099a44c815..27057923c8 100644 --- a/driver/charger/bq24192.c +++ b/driver/charger/bq24192.c @@ -17,7 +17,7 @@ /* Console output macros */ #define CPUTS(outstr) cputs(CC_CHARGER, outstr) -#define CPRINTS(format, args...) cprints(CC_CHARGER, format, ## args) +#define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ## args) /* Charger information */ static const struct charger_info bq24192_charger_info = { @@ -217,7 +217,7 @@ static void bq24192_init(void) int val; if (charger_device_id(&val) || val != BQ24192_DEVICE_ID) { - CPRINTF("BQ24192 incorrent ID: 0x%02x", val); + CPRINTF("BQ24192 incorrent ID: 0x%02x\n", val); return; } @@ -241,7 +241,7 @@ static void bq24192_init(void) if (bq24192_watchdog_reset()) return; - CPRINTF("BQ24192 initialized"); + CPRINTF("BQ24192 initialized\n"); } DECLARE_HOOK(HOOK_INIT, bq24192_init, HOOK_PRIO_LAST); diff --git a/driver/regulator_ir357x.c b/driver/regulator_ir357x.c index 89b1f9f2ee..0221b2a170 100644 --- a/driver/regulator_ir357x.c +++ b/driver/regulator_ir357x.c @@ -15,7 +15,7 @@ /* Console output macros */ #define CPUTS(outstr) cputs(CC_CHIPSET, outstr) -#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +#define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args) /* 8-bit I2C address */ #define IR357x_I2C_ADDR (0x8 << 1) @@ -113,7 +113,7 @@ static void ir357x_write(uint8_t reg, uint8_t val) res = i2c_write8(I2C_PORT_REGULATOR, IR357x_I2C_ADDR, reg, val); if (res) - CPRINTF("IR I2C write failed"); + CPRINTF("IR I2C write failed\n"); } static int ir357x_get_version(void) @@ -151,12 +151,12 @@ static void ir357x_prog(void) for (; settings->reg; settings++) ir357x_write(settings->reg, settings->value); } else { - CPRINTF("IR%d chip unsupported. Skip writing settings!", + CPRINTF("IR%d chip unsupported. Skip writing settings!\n", ir357x_get_version()); return; } - CPRINTF("IR%d registers UPDATED", ir357x_get_version()); + CPRINTF("IR%d registers UPDATED\n", ir357x_get_version()); } static void ir357x_dump(void) |