summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei-Ning Huang <wnhuang@google.com>2017-05-12 22:12:17 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-05-12 13:09:54 -0700
commitfb6b933def1e94749463423ee69d762613954975 (patch)
tree97d5433ab667648a8a50dd574f6d31daf05a9335
parent00da0f8c87e04ef5aaacebfc882e9055056bb30f (diff)
downloadchrome-ec-fb6b933def1e94749463423ee69d762613954975.tar.gz
uart: fix compile warning when !defined CONFIG_CONSOLE_ENABLE_READ_V1
Fix compile warning when CONFIG_CONSOLE_ENABLE_READ_V1 is undefined. BRANCH=none BUG=b:37584134 TEST=with CONFIG_CONSOLE_ENABLE_READ_V1 undefined, `make BOARD=rose -j` Change-Id: I86f57e6fe92032ad688e861688f99b3f430404f4 Signed-off-by: Wei-Ning Huang <wnhuang@google.com> Reviewed-on: https://chromium-review.googlesource.com/504687 Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org> Tested-by: Wei-Ning Huang <wnhuang@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
-rw-r--r--common/uart_buffering.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c
index e8dfacd11d..439d7cce28 100644
--- a/common/uart_buffering.c
+++ b/common/uart_buffering.c
@@ -396,8 +396,6 @@ static int console_read_helper(struct host_cmd_handler_args *args,
static int host_command_console_read(struct host_cmd_handler_args *args)
{
- const struct ec_params_console_read_v1 *p;
-
if (args->version == 0) {
/*
* Prior versions of this command only support reading from
@@ -407,6 +405,8 @@ static int host_command_console_read(struct host_cmd_handler_args *args)
return console_read_helper(args, &tx_snapshot_tail);
#ifdef CONFIG_CONSOLE_ENABLE_READ_V1
} else if (args->version == 1) {
+ const struct ec_params_console_read_v1 *p;
+
/* Check the params to figure out where to start reading. */
p = args->params;
if (p->subcmd == CONSOLE_READ_NEXT)