public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 2/2] Freescale eLBC FCM NAND driver
Date: Tue, 25 Mar 2008 12:06:00 -0500	[thread overview]
Message-ID: <47E930F8.8010005@freescale.com> (raw)
In-Reply-To: <20080325164936.GA9966@game.jcrosoft.org>

Jean-Christophe PLAGNIOL-VILLARD wrote:
>> +#if defined(CONFIG_CMD_NAND) && defined(CONFIG_NAND_FSL_ELBC)
> Please move to the Makefile

OK.

>> +	/* READOOB reads only the OOB because no ECC is performed. */
>> +	case NAND_CMD_READOOB:
>> +		vdbg("fsl_elbc_cmdfunc: NAND_CMD_READOOB, page_addr:"
>> +		     " 0x%x, column: 0x%x.\n", page_addr, column);
>> +
>> +		out_be32(&lbc->fbcr, mtd->oobsize - column);
>> +		set_addr(mtd, column, page_addr, 1);
>> +
>> +		ctrl->read_bytes = mtd->writesize + mtd->oobsize;
>> +
>> +		fsl_elbc_do_read(chip, 1);
>> +		fsl_elbc_run_command(mtd);
>> +		
>    ^^^^^^^^^^^^^
> WhiteSpace please remove

Grr... I keep forgetting to enable the post-commit hook in new git 
repositories.  I wish it could be configured globally in a ~/.gitrc or 
similar.

Of course, I also wish people wouldn't get so bent out of shape about 
blank lines being indented to the level of the code around them.

>> +static void fsl_elbc_select_chip(struct mtd_info *mtd, int chip)
>> +{
>> +	/* The hardware does not seem to support multiple
>> +	 * chips per bank.
>> +	 */
> please use this comment style

Do we really need such trivial style differences with the Linux driver, 
which will only serve as an annoyance when keeping the two in sync, not 
to mention wasting vertical space with no readability benefit because 
there's pretty much always a (mostly) blank line above the comment?

>> +	return i == len && ctrl->status == LTESR_CC ? 0 : -EIO;
> please use something like that to help the reading
> 	return ((i==len) && (ctrl->status==LTESR_CC))? 0 : -EIO;

That's not the style I've generally seen used.

-Scott

  reply	other threads:[~2008-03-25 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-24 17:53 [U-Boot-Users] [PATCH 2/2] Freescale eLBC FCM NAND driver Scott Wood
2008-03-25 16:49 ` Jean-Christophe PLAGNIOL-VILLARD
2008-03-25 17:06   ` Scott Wood [this message]
2008-03-25 19:33     ` Stefan Roese

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=47E930F8.8010005@freescale.com \
    --to=scottwood@freescale.com \
    --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