[U-Boot] [PATCH v7 4/4] EXYNOS: SMDK5250: Add MMC SPL support
Doug Anderson
dianders at chromium.org
Thu Feb 9 00:35:28 CET 2012
On Thu, Feb 2, 2012 at 1:21 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Thursday 02 February 2012 04:11:27 Chander Kashyap wrote:
> > +int main(int argc, char **argv)
> > +{
> > ...
> > + unsigned char buffer[BUFSIZE] = {0};
>
> this is an implicit memset() and from what i can see in the code, useless.
> you read() the entire buffer, so there's no need to initialize it.
Funny, I was just about to submit a patch to add this = {0} myself when I
found this message. ;) I would say that it (or a memset, whichever people
prefer) is a good idea so that this tool can be used to make a reasonable
SPL out of any source binary executable, even ones that are smaller than
14K.
Specifically, I assembled a bit of quick-and-dirty code for debugging (60
bytes) and wanted to convince the processor to load it as a BL2. This tool
worked for the process, but it produced a file with some random data in it.
Ick.
I wouldn't hold up committing this patch series for it, though...
-Doug
More information about the U-Boot
mailing list