--- zzzz-none-000/linux-5.15.111/drivers/mtd/ubi/attach.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/drivers/mtd/ubi/attach.c 2024-02-07 09:27:49.000000000 +0000 @@ -6,6 +6,11 @@ */ /* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017, Intel Corporation. + */ + +/* * UBI attaching sub-system. * * This sub-system is responsible for attaching MTD devices and it also @@ -76,7 +81,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 +1656,7 @@ return err; } +#ifdef CONFIG_MTD_UBI_DEBUG /** * self_check_ai - check the attaching information. * @ubi: UBI device description object @@ -1921,3 +1931,4 @@ dump_stack(); return -EINVAL; } +#endif /* CONFIG_MTD_UBI_DEBUG */