RE: [PATCH v9 3/9] mtd: nand: omap: cleanup: replace local references with generic framework names

2013-10-18 Thread Gupta, Pekon
 From: Brian Norris [mailto:computersforpe...@gmail.com]
  On Tue, Oct 15, 2013 at 11:19:51AM +0530, Pekon Gupta wrote:
  This patch updates following in omap_nand_probe() and
 omap_nand_remove()
  - replaces info-nand with nand_chip (struct nand_chip *nand_chip)
  - replaces info-mtd with mtd (struct mtd_info *mtd)
  - white-space and formatting cleanup
 
  Signed-off-by: Pekon Gupta pe...@ti.com
 
 This patch looks good. Thanks for being consistent.
 

  diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
  index 8d521aa..5596368 100644
  --- a/drivers/mtd/nand/omap2.c
  +++ b/drivers/mtd/nand/omap2.c
 
 ...
 
  @@ -1846,17 +1848,16 @@ static int omap_nand_probe(struct
  -
  -   info-nand.options  = pdata-devsize;
  -   info-nand.options  |= NAND_SKIP_BBTSCAN;
  +   mtd = info-mtd;
  +   mtd-priv   = info-nand;
  +   mtd-name   = dev_name(pdev-dev);
  +   mtd-owner  = THIS_MODULE;
  +   nand_chip   = info-nand;
  +   nand_chip-options  = pdata-devsize;
 
 Trivial side comment: the 'devsize' field is not named very
 informatively. It is apparently just a way to specify nand_chip.options,
 and it is only actually used for setting a buswidth. (It is also badly
 named nand_type in other places.) Not sure if it's worth improving, or
 even dropping at some later point in time.
 
For now I'm keeping this name consistent for now, as this would require
touching GPMC driver also, where 'devsize' is used to configure
GPMC controller registers.

I'll keep this feedback as pending for independent patch where I probe
driver with NAND_BUSWIDTH_AUTO.


with regards, pekon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 3/9] mtd: nand: omap: cleanup: replace local references with generic framework names

2013-10-16 Thread Brian Norris
Hi Pekon,

On Tue, Oct 15, 2013 at 11:19:51AM +0530, Pekon Gupta wrote:
 This patch updates following in omap_nand_probe() and omap_nand_remove()
 - replaces info-nand with nand_chip (struct nand_chip *nand_chip)
 - replaces info-mtd with mtd (struct mtd_info *mtd)
 - white-space and formatting cleanup
 
 Signed-off-by: Pekon Gupta pe...@ti.com

This patch looks good. Thanks for being consistent.

 ---
  drivers/mtd/nand/omap2.c | 112 
 ---
  1 file changed, 57 insertions(+), 55 deletions(-)
 
 diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
 index 8d521aa..5596368 100644
 --- a/drivers/mtd/nand/omap2.c
 +++ b/drivers/mtd/nand/omap2.c

...

 @@ -1846,17 +1848,16 @@ static int omap_nand_probe(struct platform_device 
 *pdev)
   spin_lock_init(info-controller.lock);
   init_waitqueue_head(info-controller.wq);
  
 - info-pdev = pdev;
 -
 + info-pdev  = pdev;
   info-gpmc_cs   = pdata-cs;
   info-reg   = pdata-reg;
 -
 - info-mtd.priv  = info-nand;
 - info-mtd.name  = dev_name(pdev-dev);
 - info-mtd.owner = THIS_MODULE;
 -
 - info-nand.options  = pdata-devsize;
 - info-nand.options  |= NAND_SKIP_BBTSCAN;
 + mtd = info-mtd;
 + mtd-priv   = info-nand;
 + mtd-name   = dev_name(pdev-dev);
 + mtd-owner  = THIS_MODULE;
 + nand_chip   = info-nand;
 + nand_chip-options  = pdata-devsize;

Trivial side comment: the 'devsize' field is not named very
informatively. It is apparently just a way to specify nand_chip.options,
and it is only actually used for setting a buswidth. (It is also badly
named nand_type in other places.) Not sure if it's worth improving, or
even dropping at some later point in time.

 + nand_chip-options  |= NAND_SKIP_BBTSCAN;
  #ifdef CONFIG_MTD_NAND_OMAP_BCH
   info-of_node   = pdata-of_node;
  #endif

[...]

Brian
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html