public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Joachim Jaeger <jjaeger@fsforth.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: Your patch NAND READ.JFFS2S
Date: Wed, 16 Mar 2005 17:08:42 +0100	[thread overview]
Message-ID: <42385A0A.9060306@fsforth.de> (raw)
In-Reply-To: <20050316153728.14EE2C1510@atlas.denx.de>

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

  reply	other threads:[~2005-03-16 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2005-03-16 16:20       ` Wolfgang Denk
2005-03-18 11:36         ` Joachim Jaeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42385A0A.9060306@fsforth.de \
    --to=jjaeger@fsforth.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox