* [U-Boot-Users] Re: Your patch NAND READ.JFFS2S
[not found] <4238282E.8080302@identecsolutions.de>
@ 2005-03-16 14:53 ` Joachim Jaeger
2005-03-16 15:37 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Joachim Jaeger @ 2005-03-16 14:53 UTC (permalink / raw)
To: u-boot
Hi,
you are right, the } has to be moved also.
So the correct patch is:
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
if (cmd & NANDRW_READ)
cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on
read too) */
+ }
+ else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
+ cmd |= NANDRW_JFFS2; /* skip bad blocks */
Best regards
Joachim
Frieder Ferlemann wrote:
> Hi,
>
> this patch looks suspect:
>
> else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
> cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
> if (cmd & NANDRW_READ)
> cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on
> read too) */
> + else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
> + cmd |= NANDRW_JFFS2; /* skip bad blocks */
> }
>
> fixing indentation it is:
>
> else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
> cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
> if (cmd & NANDRW_READ)
> cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on
> read too) */
> + else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
> + cmd |= NANDRW_JFFS2; /* skip bad blocks */
> }
>
> which you probably don't intend?
--
*********************************************************
For more information: http://www.fsforth.de
*********************************************************
Joachim Jaeger
FS FORTH-SYSTEME GmbH
Kueferstr. 8, D-79206 Breisach
Phone: +49 (7667) 908-146, FAX +49 (7667) 908-246
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Re: Your patch NAND READ.JFFS2S
2005-03-16 14:53 ` [U-Boot-Users] Re: Your patch NAND READ.JFFS2S Joachim Jaeger
@ 2005-03-16 15:37 ` Wolfgang Denk
2005-03-16 16:08 ` Joachim Jaeger
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2005-03-16 15:37 UTC (permalink / raw)
To: u-boot
[I'm not sure which message this is a Re: to, as I haven't seen any
message(s) with this subject (yet?)]
In message <42384865.5080100@fsforth.de> you wrote:
>
> you are right, the } has to be moved also.
> So the correct patch is:
>
> else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
> cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
> if (cmd & NANDRW_READ)
> cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on
> read too) */
> + }
> + else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
> + cmd |= NANDRW_JFFS2; /* skip bad blocks */
I woould reject this because it is violating the coding style.
['}' and 'else' on the same line; indentation by TAB].
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Re: Your patch NAND READ.JFFS2S
2005-03-16 15:37 ` Wolfgang Denk
@ 2005-03-16 16:08 ` Joachim Jaeger
2005-03-16 16:20 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Joachim Jaeger @ 2005-03-16 16:08 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
Wolfgang Denk wrote:
> [I'm not sure which message this is a Re: to, as I haven't seen any
> message(s) with this subject (yet?)]
my first message was sent at 10.03.05 11:00 o'clock to this list, where
I reported the problem with the nand read.jffs2s command
Today I received a Re to this mail from Frieder, but the list not included.
Because I wanted the list to know about the patch, I CCed the list
within this mail.
>
>
> In message <42384865.5080100@fsforth.de> you wrote:
>
>>you are right, the } has to be moved also.
>>So the correct patch is:
>>
>> else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
>> cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
>> if (cmd & NANDRW_READ)
>> cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on
>> read too) */
>> + }
>> + else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
>> + cmd |= NANDRW_JFFS2; /* skip bad blocks */
>
>
> I woould reject this because it is violating the coding style.
> ['}' and 'else' on the same line; indentation by TAB].
Sorry for this violation, but I copied the parts from u-boot version
1.1.2 (cmd_nand.c):
if (cmdtail && !strncmp(cmdtail, ".oob", 2)) {
/* read out-of-band data */
if (cmd & NANDRW_READ) {
ret = nand_read_oob(nand_dev_desc + curr_device,
off, size, &total,
(u_char*)addr);
}
else {
ret = nand_write_oob(nand_dev_desc + curr_device,
off, size, &total,
(u_char*)addr);
}
return ret;
}
else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
cmd |= NANDRW_JFFS2; /* skip bad blocks */
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
if (cmd & NANDRW_READ)
cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on read too) */
}
So the patch should be:
else if (cmdtail && !strncmp(cmdtail, ".jffs2s", 2)) {
cmd |= NANDRW_JFFS2; /* skip bad blocks (on read too) */
if (cmd & NANDRW_READ)
cmd |= NANDRW_JFFS2_SKIP; /* skip bad blocks (on
read too) */
+ } else if (cmdtail && !strncmp(cmdtail, ".jffs2", 2))
+ cmd |= NANDRW_JFFS2; /* skip bad blocks */
>
Regards
Joachim
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
--
*********************************************************
For more information: http://www.fsforth.de
*********************************************************
Joachim Jaeger
FS FORTH-SYSTEME GmbH
Kueferstr. 8, D-79206 Breisach
Phone: +49 (7667) 908-146, FAX +49 (7667) 908-246
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Re: Your patch NAND READ.JFFS2S
2005-03-16 16:08 ` Joachim Jaeger
@ 2005-03-16 16:20 ` Wolfgang Denk
2005-03-18 11:36 ` Joachim Jaeger
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2005-03-16 16:20 UTC (permalink / raw)
To: u-boot
In message <42385A0A.9060306@fsforth.de> you wrote:
>
> Wolfgang Denk wrote:
> > [I'm not sure which message this is a Re: to, as I haven't seen any
> > message(s) with this subject (yet?)]
>
> my first message was sent at 10.03.05 11:00 o'clock to this list, where
> I reported the problem with the nand read.jffs2s command
I see -- but this was under a different subject. I wish people
learned to quote correctly :-(
> Today I received a Re to this mail from Frieder, but the list not included.
> Because I wanted the list to know about the patch, I CCed the list
> within this mail.
Thanks.
> Sorry for this violation, but I copied the parts from u-boot version
> 1.1.2 (cmd_nand.c):
...which should be fixed if there is a reason to touch that file.
> So the patch should be:
Can you please submit a proper patch, then? [and indicate that it
obsoletes the previous one?] Thanks.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Without facts, the decision cannot be made logically. You must rely
on your human intuition.
-- Spock, "Assignment: Earth", stardate unknown
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] Re: Your patch NAND READ.JFFS2S
2005-03-16 16:20 ` Wolfgang Denk
@ 2005-03-18 11:36 ` Joachim Jaeger
0 siblings, 0 replies; 5+ messages in thread
From: Joachim Jaeger @ 2005-03-18 11:36 UTC (permalink / raw)
To: u-boot
Hi,
please find enclosed the patch for the file cmd_nand.c (against
u-boot-1.1.2), which makes the previous one obsolete:
nand read.jffs2s and nand read.i have been fixed
Best regards
Joachim
Wolfgang Denk wrote:
> In message <42385A0A.9060306@fsforth.de> you wrote:
>
>>Wolfgang Denk wrote:
>>
>
> Can you please submit a proper patch, then? [and indicate that it
> obsoletes the previous one?] Thanks.
>
>
> Best regards,
>
> Wolfgang Denk
>
--
*********************************************************
For more information: http://www.fsforth.de
*********************************************************
Joachim Jaeger
FS FORTH-SYSTEME GmbH
Kueferstr. 8, D-79206 Breisach
Phone: +49 (7667) 908-146, FAX +49 (7667) 908-246
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmd_nand.patch.tgz
Type: application/x-gtar
Size: 1380 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050318/69441db8/attachment.tgz
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-18 11:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4238282E.8080302@identecsolutions.de>
2005-03-16 14:53 ` [U-Boot-Users] Re: Your patch NAND READ.JFFS2S Joachim Jaeger
2005-03-16 15:37 ` Wolfgang Denk
2005-03-16 16:08 ` Joachim Jaeger
2005-03-16 16:20 ` Wolfgang Denk
2005-03-18 11:36 ` Joachim Jaeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox