]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mtd: ubi: Remove unused ubi_flush
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 8 Jun 2025 16:15:35 +0000 (17:15 +0100)
committerRichard Weinberger <richard@nod.at>
Thu, 24 Jul 2025 20:19:17 +0000 (22:19 +0200)
ubi_flush() was added in 2012 as part of
commit 62f384552b67 ("UBI: modify ubi_wl_flush function to clear work queue
for a lnum")
but has remained unused.

(It's friend ubi_wl_flush() is still used)

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/kapi.c
include/linux/mtd/ubi.h

index f1ea8677467fbfc6f3585d54544a50ed2c17c99d..df0a5a57b07215fde660d0bbac1d5186e3c2b5a8 100644 (file)
@@ -791,33 +791,6 @@ int ubi_sync(int ubi_num)
 }
 EXPORT_SYMBOL_GPL(ubi_sync);
 
-/**
- * ubi_flush - flush UBI work queue.
- * @ubi_num: UBI device to flush work queue
- * @vol_id: volume id to flush for
- * @lnum: logical eraseblock number to flush for
- *
- * This function executes all pending works for a particular volume id / logical
- * eraseblock number pair. If either value is set to %UBI_ALL, then it acts as
- * a wildcard for all of the corresponding volume numbers or logical
- * eraseblock numbers. It returns zero in case of success and a negative error
- * code in case of failure.
- */
-int ubi_flush(int ubi_num, int vol_id, int lnum)
-{
-       struct ubi_device *ubi;
-       int err = 0;
-
-       ubi = ubi_get_device(ubi_num);
-       if (!ubi)
-               return -ENODEV;
-
-       err = ubi_wl_flush(ubi, vol_id, lnum);
-       ubi_put_device(ubi);
-       return err;
-}
-EXPORT_SYMBOL_GPL(ubi_flush);
-
 BLOCKING_NOTIFIER_HEAD(ubi_notifiers);
 
 /**
index 562f92504f2b7c9aa271eada506c7d91baf4a243..c3f79c4be1cc28e362f78fa1c7e6520014af8401 100644 (file)
@@ -250,7 +250,6 @@ int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum);
 int ubi_leb_map(struct ubi_volume_desc *desc, int lnum);
 int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum);
 int ubi_sync(int ubi_num);
-int ubi_flush(int ubi_num, int vol_id, int lnum);
 
 /*
  * This function is the same as the 'ubi_leb_read()' function, but it does not