public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] Fix NAND controllers probe functions error path
@ 2018-04-21 18:00 Miquel Raynal
  2018-04-21 18:00 ` [PATCH v3 01/11] mtd: rawnand: docg4: fix the probe function " Miquel Raynal
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Miquel Raynal @ 2018-04-21 18:00 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut
  Cc: linux-mtd, Vladimir Zapolskiy, Sylvain Lemieux, Miquel Raynal

Hello all,

In order to remove the limitation that prevents dynamic allocations
during the identification phase (nand_scan_ident()), we need to get rid
of the nand_scan_ident()/nand_scan_tail() calls from drivers and only
export nand_scan().

This series prepares the migration to nand_scan() by first fixing (and
enhancing some times) the probe function error path of the drivers that
do not use nand_scan() yet.

The three main problems addressed in the series are:
0/ unproper error path (fuzzy, styling issues, undescriptive goto's).
1/ a wrong error path that does not free/disable the resources
   correctly.
2/ nand_cleanup() is not called upon error after a successful
   nand_scan_tail().
3/ nand_release() is called instead of nand_cleanup(). nand_release()
   does call nand_cleanup() and also mtd_device_unregister(), which
   should not be called while mtd_device_register() as succeeded.

Thanks,
Miquèl

Changes since v2:
=================
 * Reworked the few remaining patches that needed small changes.
 * docg4: changed the commit message as proposed.
 * fsl_elbc/fsl_ifc: moved the wrong nand_release() out of the
   'remove' function to avoid double free possible issues.
 * fsmc/hisi504/lpc32xx_mlc/lpc32xx_slc: split the changes in two
   commits, one to fix the goto labels/style, one that actually fixes
   the function.

Changes since v1:
=================
 * Extracted only the patches fixing the error path from the first huge
   series (50+ patches) that also converted the drivers to nand_scan().
 * Changed wrong nand_release() calls to nand_cleanup().


Miquel Raynal (11):
  mtd: rawnand: docg4: fix the probe function error path
  mtd: rawnand: fsl_elbc: fix probe function error path
  mtd: rawnand: fsl_ifc: fix probe function error path
  mtd: rawnand: fsmc: clean the probe function style
  mtd: rawnand: fsmc: fix the probe function error path
  mtd: rawnand: hisi504: clean the probe function error path
  mtd: rawnand: hisi504: fix the probe function error path
  mtd: rawnand: lpc32xx_mlc: clean the probe function
  mtd: rawnand: lpc32xx_mlc: fix the probe function error path
  mtd: rawnand: lpc32xx_slc: clean the probe function
  mtd: rawnand: lpc32xx_slc: fix the probe function error path

 drivers/mtd/nand/raw/docg4.c         | 22 +++++++++++----------
 drivers/mtd/nand/raw/fsl_elbc_nand.c | 13 ++++++++----
 drivers/mtd/nand/raw/fsl_ifc_nand.c  | 12 +++++++++---
 drivers/mtd/nand/raw/fsmc_nand.c     | 27 +++++++++++++------------
 drivers/mtd/nand/raw/hisi504_nand.c  | 35 ++++++++++++---------------------
 drivers/mtd/nand/raw/lpc32xx_mlc.c   | 38 +++++++++++++++++++-----------------
 drivers/mtd/nand/raw/lpc32xx_slc.c   | 26 ++++++++++++------------
 7 files changed, 91 insertions(+), 82 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-07-04 10:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-21 18:00 [PATCH v3 00/11] Fix NAND controllers probe functions error path Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 01/11] mtd: rawnand: docg4: fix the probe function " Miquel Raynal
2018-07-04 10:07   ` Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 02/11] mtd: rawnand: fsl_elbc: fix " Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 03/11] mtd: rawnand: fsl_ifc: " Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 04/11] mtd: rawnand: fsmc: clean the probe function style Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 05/11] mtd: rawnand: fsmc: fix the probe function error path Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 06/11] mtd: rawnand: hisi504: clean " Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 07/11] mtd: rawnand: hisi504: fix " Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 08/11] mtd: rawnand: lpc32xx_mlc: clean the probe function Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 09/11] mtd: rawnand: lpc32xx_mlc: fix the probe function error path Miquel Raynal
2018-04-21 18:00 ` [PATCH v3 10/11] mtd: rawnand: lpc32xx_slc: clean the probe function Miquel Raynal
2018-04-26 17:26   ` Boris Brezillon
2018-04-21 18:00 ` [PATCH v3 11/11] mtd: rawnand: lpc32xx_slc: fix the probe function error path Miquel Raynal
2018-04-26 19:51 ` [PATCH v3 00/11] Fix NAND controllers probe functions " Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox