diff options
author | AKASHI Takahiro | 2020-10-29 13:47:42 +0900 |
---|---|---|
committer | Heinrich Schuchardt | 2020-10-30 14:20:27 +0100 |
commit | 1c2d1293f608a367488b5dea7250dda8bb8f1d02 (patch) | |
tree | 075d0eaa5c1dd2683c8e2ecb796f6c2f777aebea /drivers/dfu | |
parent | 045fd8b13dc7b08a309043c28fc764c8fd2fde14 (diff) |
dfu: modify an argument type for an address
The range of an addressable pointer can go beyond 'integer'.
So change the argument type to a void pointer.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/dfu')
-rw-r--r-- | drivers/dfu/dfu_alt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dfu/dfu_alt.c b/drivers/dfu/dfu_alt.c index 8870967f4a6..53e8489b0e5 100644 --- a/drivers/dfu/dfu_alt.c +++ b/drivers/dfu/dfu_alt.c @@ -23,14 +23,14 @@ * * Return: 0 - on success, error code - otherwise */ -int dfu_write_by_name(char *dfu_entity_name, unsigned int addr, +int dfu_write_by_name(char *dfu_entity_name, void *addr, unsigned int len, char *interface, char *devstring) { char *s, *sb; int alt_setting_num, ret; struct dfu_entity *dfu; - debug("%s: name: %s addr: 0x%x len: %d device: %s:%s\n", __func__, + debug("%s: name: %s addr: 0x%p len: %d device: %s:%s\n", __func__, dfu_entity_name, addr, len, interface, devstring); ret = dfu_init_env_entities(interface, devstring); @@ -69,7 +69,7 @@ int dfu_write_by_name(char *dfu_entity_name, unsigned int addr, goto done; } - ret = dfu_write_from_mem_addr(dfu, (void *)(uintptr_t)addr, len); + ret = dfu_write_from_mem_addr(dfu, (void *)addr, len); done: dfu_free_entities(); |