Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: ubi: Remove unused ubi_flush

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>

authored by

Dr. David Alan Gilbert and committed by
Richard Weinberger
ca7be9c0 347e9f50

-28
-27
drivers/mtd/ubi/kapi.c
··· 791 791 } 792 792 EXPORT_SYMBOL_GPL(ubi_sync); 793 793 794 - /** 795 - * ubi_flush - flush UBI work queue. 796 - * @ubi_num: UBI device to flush work queue 797 - * @vol_id: volume id to flush for 798 - * @lnum: logical eraseblock number to flush for 799 - * 800 - * This function executes all pending works for a particular volume id / logical 801 - * eraseblock number pair. If either value is set to %UBI_ALL, then it acts as 802 - * a wildcard for all of the corresponding volume numbers or logical 803 - * eraseblock numbers. It returns zero in case of success and a negative error 804 - * code in case of failure. 805 - */ 806 - int ubi_flush(int ubi_num, int vol_id, int lnum) 807 - { 808 - struct ubi_device *ubi; 809 - int err = 0; 810 - 811 - ubi = ubi_get_device(ubi_num); 812 - if (!ubi) 813 - return -ENODEV; 814 - 815 - err = ubi_wl_flush(ubi, vol_id, lnum); 816 - ubi_put_device(ubi); 817 - return err; 818 - } 819 - EXPORT_SYMBOL_GPL(ubi_flush); 820 - 821 794 BLOCKING_NOTIFIER_HEAD(ubi_notifiers); 822 795 823 796 /**
-1
include/linux/mtd/ubi.h
··· 250 250 int ubi_leb_map(struct ubi_volume_desc *desc, int lnum); 251 251 int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum); 252 252 int ubi_sync(int ubi_num); 253 - int ubi_flush(int ubi_num, int vol_id, int lnum); 254 253 255 254 /* 256 255 * This function is the same as the 'ubi_leb_read()' function, but it does not