--- zzzz-none-000/linux-5.15.111/drivers/mtd/ubi/attach.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/drivers/mtd/ubi/attach.c 2024-02-07 10:23:08.000000000 +0000 @@ -76,7 +76,11 @@ #include #include "ubi.h" +#ifdef CONFIG_MTD_UBI_DEBUG static int self_check_ai(struct ubi_device *ubi, struct ubi_attach_info *ai); +#else +#define self_check_ai(ubi, ai) 0 +#endif #define AV_FIND BIT(0) #define AV_ADD BIT(1) @@ -1647,6 +1651,7 @@ return err; } +#ifdef CONFIG_MTD_UBI_DEBUG /** * self_check_ai - check the attaching information. * @ubi: UBI device description object @@ -1921,3 +1926,4 @@ dump_stack(); return -EINVAL; } +#endif /* CONFIG_MTD_UBI_DEBUG */