diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-03-16 13:34:22 +0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-03-18 05:06:30 +0000 |
commit | c8efdd91acf877ae9badfbda462aa10c084bb7ee (patch) | |
tree | 9f16033f0c2c8513e5d28ec7d7283ef1b04833b0 /common | |
parent | 77b1e9eae1ed5343372f9a07d2188d65c1c97c3b (diff) | |
download | chrome-ec-c8efdd91acf877ae9badfbda462aa10c084bb7ee.tar.gz |
i2c(npcx): Replace cprints by cputs/cprintf
These print-outs are usually very deep in the call stack (rare
error cases that do not happen often), and therefore are the
longest branches on most tasks. Replacing cprints by
cputs/cprintf helps with that.
BRANCH=none
BUG=b:75234824
TEST=make BOARD=soraka SECTION=RW analyzestack | grep Task shrinks
significantly (more than 100 bytes on some tasks)
Change-Id: I7c5bb750f4aa624cd06736e0bb6b24d307fc0196
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/966041
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit c776583aeb62eadddbe50846cd4d41f6520be37a)
Reviewed-on: https://chromium-review.googlesource.com/967921
Diffstat (limited to 'common')
-rw-r--r-- | common/i2c_master.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/i2c_master.c b/common/i2c_master.c index c14ed03d73..6d6fcf615c 100644 --- a/common/i2c_master.c +++ b/common/i2c_master.c @@ -431,7 +431,7 @@ int i2c_unwedge(int port) * If we get here, a slave is holding the clock * low and there is nothing we can do. */ - CPRINTS("I2C unwedge failed, SCL is being held low"); + CPUTS("I2C unwedge failed, SCL is being held low"); ret = EC_ERROR_UNKNOWN; goto unwedge_done; } @@ -444,7 +444,7 @@ int i2c_unwedge(int port) if (i2c_raw_get_sda(port)) goto unwedge_done; - CPRINTS("I2C unwedge called with SDA held low"); + CPUTS("I2C unwedge called with SDA held low"); /* Keep trying to unwedge the SDA line until we run out of attempts. */ for (i = 0; i < UNWEDGE_SDA_ATTEMPTS; i++) { @@ -479,11 +479,11 @@ int i2c_unwedge(int port) } if (!i2c_raw_get_sda(port)) { - CPRINTS("I2C unwedge failed, SDA still low"); + CPUTS("I2C unwedge failed, SDA still low"); ret = EC_ERROR_UNKNOWN; } if (!i2c_raw_get_scl(port)) { - CPRINTS("I2C unwedge failed, SCL still low"); + CPUTS("I2C unwedge failed, SCL still low"); ret = EC_ERROR_UNKNOWN; } |