#include <linux/slab.h>
 #include "ubi.h"
 
-static int paranoid_check_not_bad(const struct ubi_device *ubi, int pnum);
-static int paranoid_check_peb_ec_hdr(const struct ubi_device *ubi, int pnum);
-static int paranoid_check_ec_hdr(const struct ubi_device *ubi, int pnum,
-                                const struct ubi_ec_hdr *ec_hdr);
-static int paranoid_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum);
-static int paranoid_check_vid_hdr(const struct ubi_device *ubi, int pnum,
-                                 const struct ubi_vid_hdr *vid_hdr);
+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,
+                            const struct ubi_ec_hdr *ec_hdr);
+static int self_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum);
+static int self_check_vid_hdr(const struct ubi_device *ubi, int pnum,
+                             const struct ubi_vid_hdr *vid_hdr);
 
 /**
  * ubi_io_read - read data from a physical eraseblock.
        ubi_assert(offset >= 0 && offset + len <= ubi->peb_size);
        ubi_assert(len > 0);
 
-       err = paranoid_check_not_bad(ubi, pnum);
+       err = self_check_not_bad(ubi, pnum);
        if (err)
                return err;
 
                return -EROFS;
        }
 
-       /* The below has to be compiled out if paranoid checks are disabled */
-
-       err = paranoid_check_not_bad(ubi, pnum);
+       err = self_check_not_bad(ubi, pnum);
        if (err)
                return err;
 
                 * We write to the data area of the physical eraseblock. Make
                 * sure it has valid EC and VID headers.
                 */
-               err = paranoid_check_peb_ec_hdr(ubi, pnum);
+               err = self_check_peb_ec_hdr(ubi, pnum);
                if (err)
                        return err;
-               err = paranoid_check_peb_vid_hdr(ubi, pnum);
+               err = self_check_peb_vid_hdr(ubi, pnum);
                if (err)
                        return err;
        }
 
        ubi_assert(pnum >= 0 && pnum < ubi->peb_count);
 
-       err = paranoid_check_not_bad(ubi, pnum);
+       err = self_check_not_bad(ubi, pnum);
        if (err != 0)
                return err;
 
        crc = crc32(UBI_CRC32_INIT, ec_hdr, UBI_EC_HDR_SIZE_CRC);
        ec_hdr->hdr_crc = cpu_to_be32(crc);
 
-       err = paranoid_check_ec_hdr(ubi, pnum, ec_hdr);
+       err = self_check_ec_hdr(ubi, pnum, ec_hdr);
        if (err)
                return err;
 
        dbg_io("write VID header to PEB %d", pnum);
        ubi_assert(pnum >= 0 &&  pnum < ubi->peb_count);
 
-       err = paranoid_check_peb_ec_hdr(ubi, pnum);
+       err = self_check_peb_ec_hdr(ubi, pnum);
        if (err)
                return err;
 
        crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
        vid_hdr->hdr_crc = cpu_to_be32(crc);
 
-       err = paranoid_check_vid_hdr(ubi, pnum, vid_hdr);
+       err = self_check_vid_hdr(ubi, pnum, vid_hdr);
        if (err)
                return err;
 
 }
 
 /**
- * paranoid_check_not_bad - ensure that a physical eraseblock is not bad.
+ * self_check_not_bad - ensure that a physical eraseblock is not bad.
  * @ubi: UBI device description object
  * @pnum: physical eraseblock number to check
  *
  * This function returns zero if the physical eraseblock is good, %-EINVAL if
  * it is bad and a negative error code if an error occurred.
  */
-static int paranoid_check_not_bad(const struct ubi_device *ubi, int pnum)
+static int self_check_not_bad(const struct ubi_device *ubi, int pnum)
 {
        int err;
 
        if (!err)
                return err;
 
-       ubi_err("paranoid check failed for PEB %d", pnum);
+       ubi_err("self-check failed for PEB %d", pnum);
        dump_stack();
        return err > 0 ? -EINVAL : err;
 }
 
 /**
- * paranoid_check_ec_hdr - check if an erase counter header is all right.
+ * self_check_ec_hdr - check if an erase counter header is all right.
  * @ubi: UBI device description object
  * @pnum: physical eraseblock number the erase counter header belongs to
  * @ec_hdr: the erase counter header to check
  * This function returns zero if the erase counter header contains valid
  * values, and %-EINVAL if not.
  */
-static int paranoid_check_ec_hdr(const struct ubi_device *ubi, int pnum,
-                                const struct ubi_ec_hdr *ec_hdr)
+static int self_check_ec_hdr(const struct ubi_device *ubi, int pnum,
+                            const struct ubi_ec_hdr *ec_hdr)
 {
        int err;
        uint32_t magic;
 
        err = validate_ec_hdr(ubi, ec_hdr);
        if (err) {
-               ubi_err("paranoid check failed for PEB %d", pnum);
+               ubi_err("self-check failed for PEB %d", pnum);
                goto fail;
        }
 
 }
 
 /**
- * paranoid_check_peb_ec_hdr - check erase counter header.
+ * self_check_peb_ec_hdr - check erase counter header.
  * @ubi: UBI device description object
  * @pnum: the physical eraseblock number to check
  *
  * This function returns zero if the erase counter header is all right and and
  * a negative error code if not or if an error occurred.
  */
-static int paranoid_check_peb_ec_hdr(const struct ubi_device *ubi, int pnum)
+static int self_check_peb_ec_hdr(const struct ubi_device *ubi, int pnum)
 {
        int err;
        uint32_t crc, hdr_crc;
        hdr_crc = be32_to_cpu(ec_hdr->hdr_crc);
        if (hdr_crc != crc) {
                ubi_err("bad CRC, calculated %#08x, read %#08x", crc, hdr_crc);
-               ubi_err("paranoid check failed for PEB %d", pnum);
+               ubi_err("self-check failed for PEB %d", pnum);
                ubi_dump_ec_hdr(ec_hdr);
                dump_stack();
                err = -EINVAL;
                goto exit;
        }
 
-       err = paranoid_check_ec_hdr(ubi, pnum, ec_hdr);
+       err = self_check_ec_hdr(ubi, pnum, ec_hdr);
 
 exit:
        kfree(ec_hdr);
 }
 
 /**
- * paranoid_check_vid_hdr - check that a volume identifier header is all right.
+ * self_check_vid_hdr - check that a volume identifier header is all right.
  * @ubi: UBI device description object
  * @pnum: physical eraseblock number the volume identifier header belongs to
  * @vid_hdr: the volume identifier header to check
  * This function returns zero if the volume identifier header is all right, and
  * %-EINVAL if not.
  */
-static int paranoid_check_vid_hdr(const struct ubi_device *ubi, int pnum,
-                                 const struct ubi_vid_hdr *vid_hdr)
+static int self_check_vid_hdr(const struct ubi_device *ubi, int pnum,
+                             const struct ubi_vid_hdr *vid_hdr)
 {
        int err;
        uint32_t magic;
 
        err = validate_vid_hdr(ubi, vid_hdr);
        if (err) {
-               ubi_err("paranoid check failed for PEB %d", pnum);
+               ubi_err("self-check failed for PEB %d", pnum);
                goto fail;
        }
 
        return err;
 
 fail:
-       ubi_err("paranoid check failed for PEB %d", pnum);
+       ubi_err("self-check failed for PEB %d", pnum);
        ubi_dump_vid_hdr(vid_hdr);
        dump_stack();
        return -EINVAL;
 }
 
 /**
- * paranoid_check_peb_vid_hdr - check volume identifier header.
+ * self_check_peb_vid_hdr - check volume identifier header.
  * @ubi: UBI device description object
  * @pnum: the physical eraseblock number to check
  *
  * This function returns zero if the volume identifier header is all right,
  * and a negative error code if not or if an error occurred.
  */
-static int paranoid_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum)
+static int self_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum)
 {
        int err;
        uint32_t crc, hdr_crc;
        if (hdr_crc != crc) {
                ubi_err("bad VID header CRC at PEB %d, calculated %#08x, "
                        "read %#08x", pnum, crc, hdr_crc);
-               ubi_err("paranoid check failed for PEB %d", pnum);
+               ubi_err("self-check failed for PEB %d", pnum);
                ubi_dump_vid_hdr(vid_hdr);
                dump_stack();
                err = -EINVAL;
                goto exit;
        }
 
-       err = paranoid_check_vid_hdr(ubi, pnum, vid_hdr);
+       err = self_check_vid_hdr(ubi, pnum, vid_hdr);
 
 exit:
        ubi_free_vid_hdr(ubi, vid_hdr);
                if (c == c1)
                        continue;
 
-               ubi_err("paranoid check failed for PEB %d:%d, len %d",
+               ubi_err("self-check failed for PEB %d:%d, len %d",
                        pnum, offset, len);
                ubi_msg("data differ at position %d", i);
                dump_len = max_t(int, 128, len - i);
        return 0;
 
 fail:
-       ubi_err("paranoid check failed for PEB %d", pnum);
+       ubi_err("self-check failed for PEB %d", pnum);
        ubi_msg("hex dump of the %d-%d region", offset, offset + len);
        print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1, buf, len, 1);
        err = -EINVAL;