ret = onenand_verify_page(mtd, (u_char *) buf, to, block, page); 
ret = onenand_verify_page(mtd, (u_char *) buf, to); 
static int onenand_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,	size_t *retlen, const u_char *buf,	u_char *eccbuf, struct nand_oobinfo *oobsel){	struct onenand_chip *this = mtd->priv;	int written = 0;	int ret = 0;	DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_ecc: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);	/* Initialize retlen, in case of early exit */	*retlen = 0;	/* Do not allow writes past end of device */	if (unlikely((to + len) > mtd->size)) {		DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: Attempt write to past end of device\n");		return -EINVAL;	}	/* Reject writes, which are not page aligned */        if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(len))) {                DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: Attempt to write not page aligned data\n");                return -EINVAL;        }	/* Grab the lock and see if the device is available */	onenand_get_device(mtd, FL_WRITING);	/* Loop until all data write */	while (written < len) {		int thislen = min_t(int, mtd->oobblock, len - written);		this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobblock);		this->write_bufferram(mtd, ONENAND_DATARAM, buf, 0, thislen);		this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize);		this->command(mtd, ONENAND_CMD_PROG, to, mtd->oobblock);		onenand_update_bufferram(mtd, to, 1);		ret = this->wait(mtd, FL_WRITING);		if (ret) {			DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: write filaed %d\n", ret);			goto out;		}		written += thislen;		/* Only check verify write turn on */		ret = onenand_verify_page(mtd, (u_char *) buf, to, block, page);		if (ret) {			DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: verify failed %d\n", ret);			goto out;		}		if (written == len)			break;		to += thislen;		buf += thislen;	}out:	/* Deselect and wake up anyone waiting on the device */	onenand_release_device(mtd);	*retlen = written;		return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d36d63d404b75ddf231da0dbd3640e6d1722b4ab/onenand_base.c/clean/drivers/mtd/onenand/onenand_base.c