mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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>
This commit is contained in:
committed by
chrome-internal-fetch
parent
c288fcf281
commit
2ebf92a0a8
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user