From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 13 Sep 2013 15:51:22 +0200 Subject: [U-Boot] [PATCH v3 2/3] dfu: ram support In-Reply-To: <5eb509735b5bd634043bbb8f56d088073773b7b8.1379055112.git.afzal.mohd.ma@gmail.com> References: <5eb509735b5bd634043bbb8f56d088073773b7b8.1379055112.git.afzal.mohd.ma@gmail.com> Message-ID: <201309131551.22535.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Best regards, Marek Vasut