[U-Boot] [PATCH v3 4/7] dfu: MMC specific routines for DFU operation
Mike Frysinger
vapier at gentoo.org
Thu Aug 2 01:00:11 CEST 2012
On Tuesday 31 July 2012 02:37:00 Lukasz Majewski wrote:
> --- /dev/null
> +++ b/drivers/dfu/dfu_mmc.c
>
> +static int mmc_block_op(enum dfu_mmc_op op, struct dfu_entity *dfu,
> + void *buf, long *len)
> +{
> + ALLOC_CACHE_ALIGN_BUFFER(char, cmd_buf, DFU_CMD_BUF_SIZE);
ugh, what ? you're passing this string to run_command so there is no point in
aligning it (not to mention the topic of u-boot code internally calling
run_command() is seriously wrong.
> + memset(cmd_buf, '\0', sizeof(cmd_buf));
> +
> + sprintf(cmd_buf, "mmc %s 0x%x %x %x",
that memset is pointless. delete it.
> +static int mmc_file_op(enum dfu_mmc_op op, struct dfu_entity *dfu,
> + void *buf, long *len)
> +{
came comments for this func as above
> +int dfu_fill_entity_mmc(struct dfu_entity *dfu, char* s)
"char *s", not "char* s". please search all your patches for this mistake as
it seems to have come up a lot.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120801/e8f04431/attachment.pgp>
More information about the U-Boot
mailing list