Re: [PATCH v3 7/8] mtd: rawnand: arasan: Add new Arasan NAND controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Boris,

Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> wrote on Thu, 7 May
2020 14:11:03 +0200:

> On Thu,  7 May 2020 13:00:33 +0200
> Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:
> 
> 
> > +
> > +static void anfc_chips_cleanup(struct arasan_nfc *nfc)
> > +{
> > +	struct anand *anand, *tmp;
> > +
> > +	list_for_each_entry_safe(anand, tmp, &nfc->chips, node) {
> > +		nand_release(&anand->chip);  
> 
> 		ret = mtd_device_unregister(nand_to_mtd(&anand->chip));
> 		WARN_ON(ret);
> 		nand_cleanup(&anand->chip);
> 
> Or maybe add this WARN_ON() to nand_release() so we don't have to ask
> people to use mtd_device_unregister() + nand_cleanup().

I don't get your point here? I'm not against adding a warn_on between
both functions but it's not related to this driver?

> We really
> should fix that at some point (allocate nand_chip and mtd_info
> separately and leave a dummy mtd_info object with all hooks returning
> ENODEV when the unregister fails).

Yes, we should fix that.

> 
> > +		list_del(&anand->node);
> > +	}
> > +}  

Thanks,
Miquèl



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux