/*
* ECCxxxOther does ECC calcs on arbitrary n bytes of data
*/
-void yaffs_ecc_calc_other(const unsigned char *data, unsigned nBytes,
+void yaffs_ecc_calc_other(const unsigned char *data, unsigned n_bytes,
yaffs_ECCOther *eccOther)
{
unsigned int i;
unsigned line_parity_prime = 0;
unsigned char b;
- for (i = 0; i < nBytes; i++) {
+ for (i = 0; i < n_bytes; i++) {
b = column_parity_table[*data++];
col_parity ^= b;
eccOther->lineParityPrime = line_parity_prime;
}
-int yaffs_ecc_correct_other(unsigned char *data, unsigned nBytes,
+int yaffs_ecc_correct_other(unsigned char *data, unsigned n_bytes,
yaffs_ECCOther *read_ecc,
const yaffs_ECCOther *test_ecc)
{
if (cDelta & 0x02)
bit |= 0x01;
- if (lDelta >= nBytes)
+ if (lDelta >= n_bytes)
return -1;
data[lDelta] ^= (1 << bit);