[U-Boot] [PATCH v3 2/3] dfu: ram support

Marek Vasut marex at denx.de
Fri Sep 13 15:51:22 CEST 2013


Dear Afzal Mohammed,

[...]

> +int dfu_fill_entity_ram(struct dfu_entity *dfu, char *s)
> +{
> +	char *st;
> +
> +	dfu->dev_type = DFU_DEV_RAM;
> +	st = strsep(&s, " ");
> +	if (strcmp(st, "ram")) {
> +		error("unsupported device: %s\n", st);
> +		return -ENODEV;
> +	}
> +
> +	dfu->layout = DFU_RAM_ADDR;
> +	dfu->data.ram.start = (void *)simple_strtoul(s, &s, 16);
> +	dfu->data.ram.size = simple_strtoul(++s, &s, 16);

This ++s, &s is quite crazy ;-)

Otheriwse

Acked-by: Marek Vasut <marex at denx.de>

Best regards,
Marek Vasut


More information about the U-Boot mailing list