Message ID | 20210823073359.705281-4-hch@lst.de |
---|---|
State | Accepted |
Headers | show |
Series | [1/8] mtd_blkdevs: don't hold del_mtd_blktrans_dev in blktrans_{open, release} | expand |
On Mon, 2021-08-23 at 07:33:54 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 --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 9b33c082179d..f655d2905270 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -1029,7 +1029,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) partition->mbd.tr = tr; partition->mbd.devnum = -1; - if (!add_mtd_blktrans_dev((void *)partition)) + if (!add_mtd_blktrans_dev(&partition->mbd)) return; }
Pass the actual mtd_blktrans_dev instead of casting the containing structure to void *. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/mtd/ftl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)