diff mbox series

[4/8] mtd/rfd_ftl: don't cast away the type when calling add_mtd_blktrans_dev

Message ID 20210823073359.705281-5-hch@lst.de
State Accepted
Headers show
Series [1/8] mtd_blkdevs: don't hold del_mtd_blktrans_dev in blktrans_{open, release} | expand

Commit Message

Christoph Hellwig Aug. 23, 2021, 7:33 a.m. UTC
Pass the actual mtd_blktrans_dev instead of casting the containing
structure to void *.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/mtd/rfd_ftl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miquel Raynal Aug. 23, 2021, 8:33 a.m. UTC | #1
On Mon, 2021-08-23 at 07:33:55 UTC, Christoph Hellwig wrote:
> Pass the actual mtd_blktrans_dev instead of casting the containing
> structure to void *.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

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

Miquel
diff mbox series

Patch

diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index 6e0d5ce9b010..6cf9356d3567 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -754,7 +754,7 @@  static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 		printk(KERN_INFO PREFIX "name: '%s' type: %d flags %x\n",
 				mtd->name, mtd->type, mtd->flags);
 
-		if (!add_mtd_blktrans_dev((void*)part))
+		if (!add_mtd_blktrans_dev(&part->mbd))
 			return;
 	}
 out: