--- zzzz-none-000/linux-4.9.279/drivers/mtd/ubi/io.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/drivers/mtd/ubi/io.c 2023-02-08 11:43:42.000000000 +0000 @@ -91,6 +91,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, @@ -100,6 +101,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. @@ -1126,6 +1135,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 @@ -1443,3 +1453,4 @@ vfree(buf); return err; } +#endif