[PATCH] mtd/nand: Use mtd->oops_panic_write as condition

Miquel Raynal miquel.raynal at bootlin.com
Thu Nov 19 16:05:42 EST 2020


On Fri, 2020-11-13 at 14:14:22 UTC, Sebastian Andrzej Siewior wrote:
> From: Thomas Gleixner <tglx at linutronix.de>
> 
> struct mtd_info has a flag oops_panic_write which is set when the write
> operation is issued via the panic_write() callback. That allows controller
> drivers to distinguish the panic write from a regular write.
> 
> Replace the open coded 'in_interrupt() | oops_in_progress' checks with a
> check for that flag. in_interrupt() is an unrealiable indicator anyway as
> it covers all sorts of atomic contexts not only hard and soft interrupt
> service routines.
> 
> Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> Cc: Vignesh Raghavendra <vigneshr at ti.com>
> Cc: Tudor Ambarus <tudor.ambarus at microchip.com>
> Cc: Richard Weinberger <richard at nod.at>
> Cc: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Boris Brezillon <boris.brezillon at collabora.com>
> Cc: linux-mtd at lists.infradead.org
> Cc: Miquel Raynal <miquel.raynal at bootlin.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel



More information about the linux-mtd mailing list