lkml.org 
[lkml]   [2021]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mtd: rawnand: intel: remove broken code
Hi Miquel,

thank you for looking into this

On Mon, Jan 4, 2021 at 9:48 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
[...]
> > nand_set_flash_node(&ebu_host->chip, dev->of_node);
> > - if (!mtd->name) {
> > - dev_err(ebu_host->dev, "NAND label property is mandatory\n");
> > - return -EINVAL;
> > - }
>
> This is valid code, it's best to use a label = "my-storage"; property
> in your NAND DT node. Then mtd->name will be updated by
> nand_set_flash_node().
so you suggest moving the check instead?
the original code flow was:
mtd = NULL;
if (!mtd->name)
return -EINVAL;
mtd = nand_to_mtd(&ebu_host->chip);
...

by saying that the code itself is valid you're asking me to update the
flow to the following:
mtd = nand_to_mtd(&ebu_host->chip);
if (!mtd->name)
return -EINVAL;


Best regards,
Martin

\
 
 \ /
  Last update: 2021-01-04 14:14    [W:0.046 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site