--- zzzz-none-000/linux-5.15.111/drivers/mtd/ubi/io.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/drivers/mtd/ubi/io.c 2024-02-07 09:27:49.000000000 +0000 @@ -7,6 +7,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 @@ -78,6 +83,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 +93,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 +1093,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 +1411,4 @@ vfree(buf); return err; } +#endif