--- zzzz-none-000/linux-4.9.279/drivers/mtd/ubi/wl.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/drivers/mtd/ubi/wl.c 2023-02-08 10:58:13.000000000 +0000 @@ -19,6 +19,11 @@ */ /* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017, Intel Corporation. + */ + +/* * UBI wear-leveling sub-system. * * This sub-system is responsible for wear-leveling. It works in terms of @@ -135,11 +140,17 @@ */ #define WL_MAX_FAILURES 32 +#ifdef CONFIG_MTD_UBI_DEBUG static int self_check_ec(struct ubi_device *ubi, int pnum, int ec); static int self_check_in_wl_tree(const struct ubi_device *ubi, struct ubi_wl_entry *e, struct rb_root *root); static int self_check_in_pq(const struct ubi_device *ubi, struct ubi_wl_entry *e); +#else +#define self_check_ec(ubi, pnum, ec) 0 +#define self_check_in_wl_tree(ubi, e, root) +#define self_check_in_pq(ubi, e) 0 +#endif /** * wl_tree_add - add a wear-leveling entry to a WL RB-tree. @@ -1782,6 +1793,8 @@ kfree(ubi->lookuptbl); } +#ifdef CONFIG_MTD_UBI_DEBUG + /** * self_check_ec - make sure that the erase counter of a PEB is correct. * @ubi: UBI device description object