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/pstore_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/pstore_commands.c')
-rw-r--r-- | common/pstore_commands.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/common/pstore_commands.c b/common/pstore_commands.c index 4b09c9bfcd..abc70ea8a8 100644 --- a/common/pstore_commands.c +++ b/common/pstore_commands.c @@ -12,8 +12,7 @@ int pstore_command_get_info(struct host_cmd_handler_args *args) { - struct ec_response_pstore_info *r = - (struct ec_response_pstore_info *)args->response; + struct ec_response_pstore_info *r = args->response; ASSERT(EEPROM_BLOCK_START_PSTORE + EEPROM_BLOCK_COUNT_PSTORE <= eeprom_get_block_count()); @@ -29,8 +28,7 @@ DECLARE_HOST_COMMAND(EC_CMD_PSTORE_INFO, int pstore_command_read(struct host_cmd_handler_args *args) { - const struct ec_params_pstore_read *p = - (const struct ec_params_pstore_read *)args->params; + const struct ec_params_pstore_read *p = args->params; char *dest = args->response; int block_size = eeprom_get_block_size(); int block = p->offset / block_size + EEPROM_BLOCK_COUNT_PSTORE; @@ -67,8 +65,7 @@ DECLARE_HOST_COMMAND(EC_CMD_PSTORE_READ, int pstore_command_write(struct host_cmd_handler_args *args) { - const struct ec_params_pstore_write *p = - (const struct ec_params_pstore_write *)args->params; + const struct ec_params_pstore_write *p = args->params; const char *src = p->data; int block_size = eeprom_get_block_size(); |