/* self_check_seen - check whether all PEB have been seen by fastmap. @ubi: UBI device description object @seen: integer array of @ubi->peb_count size  */
static int self_check_seen(struct ubi_device *ubi, int *seen)
/* self_check_seen - check whether all PEB have been seen by fastmap. @ubi: UBI device description object @seen: integer array of @ubi->peb_count size  */
static int self_check_seen(struct ubi_device *ubi, int *seen)
{
	int pnum, ret = 0;
	if (!ubi_dbg_chk_fastmap(ubi) || !seen)
		return 0;
	for (pnum = 0; pnum < ubi->peb_count; pnum++) {
		if (!seen[pnum] && ubi->lookuptbl[pnum]) {
			ubi_err(ubi, "self-check failed for PEB %d, fastmap didn't see it", pnum);
			ret = -EINVAL;
		}
	}
	return ret;
}