public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger•com>
To: "Singh, Vimal" <vimalsingh@ti•com>
Cc: "linuxppc-dev@ozlabs•org" <linuxppc-dev@ozlabs•org>,
	"linux-mtd@lists•infradead.org" <linux-mtd@lists•infradead.org>
Subject: Re: [PATCH v3 1/4] NAND: FSL-UPM: add multi chip support
Date: Wed, 25 Mar 2009 11:57:39 +0100	[thread overview]
Message-ID: <49CA0E23.6020701@grandegger.com> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E73940427A869E0@dbde02.ent.ti.com>

Singh, Vimal wrote:
>> +static void fun_select_chip(struct mtd_info *mtd, int chip_nr)
>> +{
>> +       struct nand_chip *chip = mtd->priv;
>> +       struct fsl_upm_nand *fun = to_fsl_upm_nand(mtd);
>> +
>> +       if (chip_nr == -1) {
>> +               chip->cmd_ctrl(mtd, NAND_CMD_NONE, 0 | 
>> NAND_CTRL_CHANGE);
>> +       } else if (chip_nr >= 0) {
>> +               fun->chip_number = chip_nr;
>> +               chip->IO_ADDR_R = chip->IO_ADDR_W =
>> +                       fun->io_base + chip_nr * fun->chip_offset;
>> +       } else {
>> +               BUG();
>> +       }
> braces are not required here...

Really? In the coding style I read:

http://lxr.linux.no/linux+v2.6.29/Documentation/CodingStyle#L171

> 
> 
>> +       prop = of_get_property(ofdev->node, "num-chips", &size);
>> +       if (prop && size == sizeof(uint32_t)) {
>> +               fun->num_chips = *prop;
>> +               if (fun->num_chips >= NAND_MAX_CHIPS) {
>> +                       dev_err(&ofdev->dev, "too much chips");
>> +                       ret = -EINVAL;
>> +                       goto err1;
>> +               }
>> +       } else {
>> +               fun->num_chips = 1;
>> +       }
> ditto...

See above.

Wolfgang.

  reply	other threads:[~2009-03-25 10:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 10:08 [PATCH v3 0/4] NAND: Multi-chip support for FSL-UPM for TQM8548 modules Wolfgang Grandegger
2009-03-25 10:08 ` [PATCH v3 1/4] NAND: FSL-UPM: add multi chip support Wolfgang Grandegger
2009-03-25 10:08   ` [PATCH v3 2/4] NAND: FSL-UPM: Add wait flags to support board/chip specific delays Wolfgang Grandegger
2009-03-25 10:08     ` [PATCH v3 3/4] powerpc: NAND: FSL UPM: document new bindings Wolfgang Grandegger
2009-03-25 10:08       ` [PATCH v3 4/4] powerpc/85xx: TQM8548: Update DTS file for multi-chip support Wolfgang Grandegger
2009-03-25 15:11       ` [PATCH v3 3/4] powerpc: NAND: FSL UPM: document new bindings Anton Vorontsov
2009-03-25 17:48       ` Grant Likely
2009-03-25 20:48         ` Wolfgang Grandegger
2009-03-26  5:09           ` Grant Likely
2009-03-26  7:42             ` Wolfgang Grandegger
2009-03-26 14:27               ` Grant Likely
2009-03-26 15:33                 ` Wolfgang Grandegger
2009-03-26 16:04                   ` Grant Likely
2009-03-26 16:35                     ` Wolfgang Grandegger
2009-03-26 17:02                       ` Grant Likely
2009-03-26 17:33                         ` Anton Vorontsov
2009-03-26 22:14                           ` Wolfgang Grandegger
2009-03-26 23:22                             ` Grant Likely
2009-03-26 23:32                               ` Anton Vorontsov
2009-03-27  8:07                               ` Wolfgang Grandegger
2009-03-25 15:01     ` [PATCH v3 2/4] NAND: FSL-UPM: Add wait flags to support board/chip specific delays Anton Vorontsov
2009-03-25 10:43   ` [PATCH v3 1/4] NAND: FSL-UPM: add multi chip support Singh, Vimal
2009-03-25 10:57     ` Wolfgang Grandegger [this message]
2009-03-25 13:31   ` Grant Likely
2009-03-25 13:32     ` Grant Likely
2009-03-25 13:43       ` Wolfgang Grandegger
2009-03-25 17:26         ` Grant Likely
2009-03-25 14:57   ` Anton Vorontsov
2009-03-25 15:25     ` Wolfgang Grandegger

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=49CA0E23.6020701@grandegger.com \
    --to=wg@grandegger$(echo .)com \
    --cc=linux-mtd@lists$(echo .)infradead.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=vimalsingh@ti$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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