diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-07-26 11:12:31 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-26 16:25:34 -0700 |
commit | 247fdaf13d7d317465d6d04b015a309721e599a9 (patch) | |
tree | 6eef0fb1a07133135f0529a6e26635b99428b6ea /common/host_event_commands.c | |
parent | d0d50b6da7b826c0aa13391d6794b66e1c0f1303 (diff) | |
download | chrome-ec-247fdaf13d7d317465d6d04b015a309721e599a9.tar.gz |
Change host command params/response pointers to void *
This removes a bunch of unnecessary typecasts, since you can assign
to/from void * without them. This also uncovered a few cases where
const was being cast away for the input params; now fixed.
BUG=none
TEST=mkbp hash from u-boot console, and/or system boots ok
Change-Id: Ic314b9d2ca06226ea8a09703ef5c1a912eb7146d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28500
Diffstat (limited to 'common/host_event_commands.c')
-rw-r--r-- | common/host_event_commands.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/common/host_event_commands.c b/common/host_event_commands.c index 670212c430..1c13ee1377 100644 --- a/common/host_event_commands.c +++ b/common/host_event_commands.c @@ -138,8 +138,7 @@ DECLARE_CONSOLE_COMMAND(hostevent, command_host_event, static int host_event_get_smi_mask(struct host_cmd_handler_args *args) { - struct ec_response_host_event_mask *r = - (struct ec_response_host_event_mask *)args->response; + struct ec_response_host_event_mask *r = args->response; r->mask = lpc_get_host_event_mask(LPC_HOST_EVENT_SMI); args->response_size = sizeof(*r); @@ -152,8 +151,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_GET_SMI_MASK, static int host_event_get_sci_mask(struct host_cmd_handler_args *args) { - struct ec_response_host_event_mask *r = - (struct ec_response_host_event_mask *)args->response; + struct ec_response_host_event_mask *r = args->response; r->mask = lpc_get_host_event_mask(LPC_HOST_EVENT_SCI); args->response_size = sizeof(*r); @@ -166,8 +164,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_GET_SCI_MASK, static int host_event_get_wake_mask(struct host_cmd_handler_args *args) { - struct ec_response_host_event_mask *r = - (struct ec_response_host_event_mask *)args->response; + struct ec_response_host_event_mask *r = args->response; r->mask = lpc_get_host_event_mask(LPC_HOST_EVENT_WAKE); args->response_size = sizeof(*r); @@ -180,8 +177,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_GET_WAKE_MASK, static int host_event_set_smi_mask(struct host_cmd_handler_args *args) { - const struct ec_params_host_event_mask *p = - (const struct ec_params_host_event_mask *)args->params; + const struct ec_params_host_event_mask *p = args->params; lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, p->mask); return EC_RES_SUCCESS; @@ -192,8 +188,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_SET_SMI_MASK, static int host_event_set_sci_mask(struct host_cmd_handler_args *args) { - const struct ec_params_host_event_mask *p = - (const struct ec_params_host_event_mask *)args->params; + const struct ec_params_host_event_mask *p = args->params; lpc_set_host_event_mask(LPC_HOST_EVENT_SCI, p->mask); return EC_RES_SUCCESS; @@ -204,8 +199,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_SET_SCI_MASK, static int host_event_set_wake_mask(struct host_cmd_handler_args *args) { - const struct ec_params_host_event_mask *p = - (const struct ec_params_host_event_mask *)args->params; + const struct ec_params_host_event_mask *p = args->params; lpc_set_host_event_mask(LPC_HOST_EVENT_WAKE, p->mask); return EC_RES_SUCCESS; @@ -218,8 +212,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_SET_WAKE_MASK, static int host_event_get_b(struct host_cmd_handler_args *args) { - struct ec_response_host_event_mask *r = - (struct ec_response_host_event_mask *)args->response; + struct ec_response_host_event_mask *r = args->response; r->mask = events_copy_b; args->response_size = sizeof(*r); @@ -232,8 +225,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_GET_B, static int host_event_clear(struct host_cmd_handler_args *args) { - const struct ec_params_host_event_mask *p = - (const struct ec_params_host_event_mask *)args->params; + const struct ec_params_host_event_mask *p = args->params; host_clear_events(p->mask); return EC_RES_SUCCESS; @@ -244,8 +236,7 @@ DECLARE_HOST_COMMAND(EC_CMD_HOST_EVENT_CLEAR, static int host_event_clear_b(struct host_cmd_handler_args *args) { - const struct ec_params_host_event_mask *p = - (const struct ec_params_host_event_mask *)args->params; + const struct ec_params_host_event_mask *p = args->params; host_clear_events_b(p->mask); return EC_RES_SUCCESS; |