--- zzzz-none-000/linux-4.9.279/drivers/mtd/ubi/attach.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/drivers/mtd/ubi/attach.c 2023-02-08 11:43:42.000000000 +0000 @@ -89,7 +89,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) @@ -1659,6 +1663,7 @@ return err; } +#ifdef CONFIG_MTD_UBI_DEBUG /** * self_check_ai - check the attaching information. * @ubi: UBI device description object @@ -1933,3 +1938,4 @@ dump_stack(); return -EINVAL; } +#endif /* CONFIG_MTD_UBI_DEBUG */