Dear =?utf-8?q?Remy=20B=C3=B6hmer?=, In message <[EMAIL PROTECTED]> you wrote: > Currently the fat code is messy related to Coding rules.
...but your new code has new issues, too. > - if (cur_dev->block_read) { > - return cur_dev->block_read (cur_dev->dev > - , startblock, getsize, (unsigned long *)bufptr); > - } > + if (cur_dev->block_read) > + return cur_dev->block_read(cur_dev->dev, startblock, nofblocks, > + (unsigned long *)bufptr); Multi-line statements do require the curly braces, and two lines is multi-line. And this... > - actsize=bytesperclust; > - endclust=curclust; > - do { > + actsize = bytesperclust; > + endclust = curclust; > + for (;;) { > /* search for consecutive clusters */ > - while(actsize < filesize) { > + while (actsize < filesize) { > newclust = get_fatent(mydata, endclust); > - if((newclust -1)!=endclust) > - goto getit; > + if ((newclust - 1) != endclust) { > + if (get_cluster(mydata, curclust, buffer, > + (int)actsize) != 0) { > + FAT_ERROR("Error reading cluster\n"); > + return -1; > + } > + gotsize += (int)actsize; > + filesize -= actsize; > + buffer += actsize; > + curclust = get_fatent(mydata, endclust); > + if (CHECK_CLUST(curclust, mydata->fatsize)) { > + FAT_DPRINT("curclust: 0x%x\n", > + curclust); > + FAT_ERROR("Invalid FAT entry\n"); > + return gotsize; > + } > + actsize = bytesperclust; > + endclust = curclust; > + continue; > + } ...looks like a massive code change, not only a coding style cleanup. Please submit as two separate patches. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] I'm a programmer: I don't buy software, I write it. -- Tom Christiansen _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot