From c4778cb4c467fecc4ab4c821197285de5842579e Mon Sep 17 00:00:00 2001 From: Philip Chen Date: Mon, 23 Apr 2018 19:56:26 -0700 Subject: [PATCH] usb_mux: Simplify logging to reduce code size BUG=none BRANCH=none TEST=make buildall Change-Id: Ib2d9476e4740527ad2e1f73eeecb0306140b3f38 Signed-off-by: Philip Chen Reviewed-on: https://chromium-review.googlesource.com/1025118 Commit-Ready: Philip Chen Tested-by: Philip Chen Reviewed-by: Nicolas Boichat --- driver/usb_mux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/driver/usb_mux.c b/driver/usb_mux.c index b9f6b8d5d3..59747baae8 100644 --- a/driver/usb_mux.c +++ b/driver/usb_mux.c @@ -24,7 +24,7 @@ void usb_mux_init(int port) ASSERT(port >= 0 && port < CONFIG_USB_PD_PORT_COUNT); res = mux->driver->init(mux->port_addr); if (res) - CPRINTS("Error initializing mux port(%d): %d", port, res); + CPRINTS("Err: init mux port(%d): %d", port, res); /* Apply board specific initialization */ if (mux->board_init) @@ -51,7 +51,7 @@ void usb_mux_set(int port, enum typec_mux mux_mode, mux_state = polarity ? mux_mode | MUX_POLARITY_INVERTED : mux_mode; res = mux->driver->set(mux->port_addr, mux_state); if (res) { - CPRINTS("Error setting mux port(%d): %d", port, res); + CPRINTS("Err: set mux port(%d): %d", port, res); return; } @@ -70,7 +70,7 @@ int usb_mux_get(int port, const char **dp_str, const char **usb_str) res = mux->driver->get(mux->port_addr, &mux_state); if (res) { - CPRINTS("Error getting mux port(%d): %d", port, res); + CPRINTS("Err: get mux port(%d): %d", port, res); return 0; } @@ -91,7 +91,7 @@ void usb_mux_flip(int port) res = mux->driver->get(mux->port_addr, &mux_state); if (res) { - CPRINTS("Error getting mux port(%d): %d", port, res); + CPRINTS("Err: get mux port(%d): %d", port, res); return; } @@ -102,7 +102,7 @@ void usb_mux_flip(int port) res = mux->driver->set(mux->port_addr, mux_state); if (res) - CPRINTS("Error setting mux port(%d): %d", port, res); + CPRINTS("Err: set mux port(%d): %d", port, res); } #ifdef CONFIG_CMD_TYPEC