--- zzzz-none-000/linux-4.9.279/drivers/mtd/ubi/io.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/drivers/mtd/ubi/io.c 2023-02-08 10:58:13.000000000 +0000 @@ -20,6 +20,11 @@ */ /* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017, Intel Corporation. + */ + +/* * UBI input/output sub-system. * * This sub-system provides a uniform way to work with all kinds of the @@ -91,6 +96,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 +106,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 +1140,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 +1458,4 @@ vfree(buf); return err; } +#endif