summaryrefslogtreecommitdiff
path: root/common/host_command.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-11-01 10:15:48 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-11-02 01:07:10 +0000
commit00682eb80fe159c1d037c721f2dd15c1be44bd12 (patch)
tree1a4365c129c6416a18e2198da5ea35c0829cb5da /common/host_command.c
parent874effa445584c04909735b96e082cc9c5787883 (diff)
downloadchrome-ec-00682eb80fe159c1d037c721f2dd15c1be44bd12.tar.gz
cleanup: Still more TODO comments
More of same. Comment changes only; no code changes. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; pass unit tests Change-Id: I8c42ed7d332cd9d461067e1aeac670855106cbcd Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/175405 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/host_command.c')
-rw-r--r--common/host_command.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/common/host_command.c b/common/host_command.c
index a0d703b90a..b5655d8593 100644
--- a/common/host_command.c
+++ b/common/host_command.c
@@ -59,6 +59,15 @@ static uint8_t command_pending;
static uint8_t saved_result = EC_RES_UNAVAILABLE;
#endif
+/*
+ * Host command args passed to command handler. Static to keep it off the
+ * stack. Note this means we can handle only one host command at a time.
+ */
+static struct host_cmd_handler_args args0;
+
+/* Current host command packet from host, for protocol version 3+ */
+static struct host_packet *pkt0;
+
uint8_t *host_get_memmap(int offset)
{
#ifdef CONFIG_LPC
@@ -120,7 +129,10 @@ test_mockable void host_send_response(struct host_cmd_handler_args *args)
void host_command_received(struct host_cmd_handler_args *args)
{
- /* TODO: should warn if we already think we're in a command */
+ /*
+ * TODO(crosbug.com/p/23806): should warn if we already think we're in
+ * a command.
+ */
/*
* If this is the reboot command, reboot immediately. This gives the
@@ -152,10 +164,6 @@ void host_command_received(struct host_cmd_handler_args *args)
host_send_response(args);
}
-/* TODO(rspangler): less awful names. */
-static struct host_cmd_handler_args args0;
-static struct host_packet *pkt0;
-
void host_packet_respond(struct host_cmd_handler_args *args)
{
struct ec_host_response *r = (struct ec_host_response *)pkt0->response;
@@ -203,7 +211,6 @@ int host_request_expected_size(const struct ec_host_request *r)
return 0;
/* Reserved byte should be 0 */
- /* TODO: maybe we should have a header checksum instead? */
if (r->reserved)
return 0;