--- zzzz-none-000/linux-5.15.111/drivers/mtd/ubi/io.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/drivers/mtd/ubi/io.c 2024-02-07 10:23:08.000000000 +0000 @@ -78,6 +78,7 @@ #include #include "ubi.h" +#ifdef CONFIG_MTD_UBI_DEBUG static int self_check_not_bad(const struct ubi_device *ubi, int pnum); static int self_check_peb_ec_hdr(const struct ubi_device *ubi, int pnum); static int self_check_ec_hdr(const struct ubi_device *ubi, int pnum, @@ -87,6 +88,14 @@ const struct ubi_vid_hdr *vid_hdr); static int self_check_write(struct ubi_device *ubi, const void *buf, int pnum, int offset, int len); +#else +#define self_check_not_bad(ubi, pnum) 0 +#define self_check_peb_ec_hdr(ubi, pnum) 0 +#define self_check_ec_hdr(ubi, pnum, ec_hdr) 0 +#define self_check_peb_vid_hdr(ubi, pnum) 0 +#define self_check_vid_hdr(ubi, pnum, vid_hdr) 0 +#define self_check_write(ubi, buf, pnum, offset, len) 0 +#endif /** * ubi_io_read - read data from a physical eraseblock. @@ -1079,6 +1088,7 @@ return err; } +#ifdef CONFIG_MTD_UBI_DEBUG /** * self_check_not_bad - ensure that a physical eraseblock is not bad. * @ubi: UBI device description object @@ -1396,3 +1406,4 @@ vfree(buf); return err; } +#endif