
Dear Rohit Hagargundgi,
In message 49AE99C0.9040400@samsung.com you wrote:
Hi,
Here is the updated patch.
Thanks, Rohit
This is not an acceptable commit message.
Please include a reasonable commit message that explains what you are doinbg and why.
Signed-off-by: Rohit Hagargundgi h.rohit@samsung.com
Comments must go below this "---" line, not above.
include/configs/apollon.h | 1 + onenand_ipl/onenand_read.c | 27 ++++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/include/configs/apollon.h b/include/configs/apollon.h index dff47fc..2e8198f 100644 --- a/include/configs/apollon.h +++ b/include/configs/apollon.h @@ -254,6 +254,7 @@
/* OneNAND boot, OneNAND has CS0, NOR boot ONeNAND has CS2 */ #define CONFIG_SYS_ONENAND_BASE 0x00000000 +#define CONFIG_SYS_MONITOR_LEN SZ_256K /* U-Boot image size */ #define CONFIG_ENV_IS_IN_ONENAND 1 #define CONFIG_ENV_ADDR 0x00020000
Your patch is white-space corrupted. Please fix your mailer settings.
int onenand_read_block0(unsigned char *buf) {
- int page, offset = 0;
- int block = 0, page, offset = 0;
Please don;t mix uninitialized and initialized variables on one line.
int pagesize = ONENAND_PAGE_SIZE;
- int nblocks = CONFIG_SYS_MONITOR_LEN / (ONENAND_PAGES_PER_BLOCK * ONENAND_PAGE_SIZE);
Line too long.
- page = ONENAND_START_PAGE;
- for (; block < nblocks; block++) {
-----------------------^^^^^^^^
for (; page < ONENAND_PAGES_PER_BLOCK; page++) {
if (onenand_read_page(block, page, buf + offset, pagesize)) {
/* This block is bad. Skip it and read next block */
nblocks++;
--------------------------------^^^^^^^^^^
break;
}
offset += pagesize;
}
page = 0;
I always consider it a design problem when the loop limits get changed within the loop. While legal C, it always gives me the creeps.
Best regards,
Wolfgang Denk