Lines Matching refs:error_data
47 static void single_bit_error_data(void *error_data, void *correct_data, in single_bit_error_data() argument
52 memcpy(error_data, correct_data, size); in single_bit_error_data()
53 __change_bit_le(offset, error_data); in single_bit_error_data()
56 static void double_bit_error_data(void *error_data, void *correct_data, in double_bit_error_data() argument
66 memcpy(error_data, correct_data, size); in double_bit_error_data()
68 __change_bit_le(offset[0], error_data); in double_bit_error_data()
69 __change_bit_le(offset[1], error_data); in double_bit_error_data()
112 static void no_bit_error(void *error_data, void *error_ecc, in no_bit_error() argument
115 memcpy(error_data, correct_data, size); in no_bit_error()
119 static int no_bit_error_verify(void *error_data, void *error_ecc, in no_bit_error_verify() argument
126 ecc_sw_hamming_calculate(error_data, size, calc_ecc, sm_order); in no_bit_error_verify()
127 ret = ecc_sw_hamming_correct(error_data, error_ecc, calc_ecc, size, in no_bit_error_verify()
129 if (ret == 0 && !memcmp(correct_data, error_data, size)) in no_bit_error_verify()
135 static void single_bit_error_in_data(void *error_data, void *error_ecc, in single_bit_error_in_data() argument
138 single_bit_error_data(error_data, correct_data, size); in single_bit_error_in_data()
142 static void single_bit_error_in_ecc(void *error_data, void *error_ecc, in single_bit_error_in_ecc() argument
145 memcpy(error_data, correct_data, size); in single_bit_error_in_ecc()
149 static int single_bit_error_correct(void *error_data, void *error_ecc, in single_bit_error_correct() argument
156 ecc_sw_hamming_calculate(error_data, size, calc_ecc, sm_order); in single_bit_error_correct()
157 ret = ecc_sw_hamming_correct(error_data, error_ecc, calc_ecc, size, in single_bit_error_correct()
159 if (ret == 1 && !memcmp(correct_data, error_data, size)) in single_bit_error_correct()
165 static void double_bit_error_in_data(void *error_data, void *error_ecc, in double_bit_error_in_data() argument
168 double_bit_error_data(error_data, correct_data, size); in double_bit_error_in_data()
172 static void single_bit_error_in_data_and_ecc(void *error_data, void *error_ecc, in single_bit_error_in_data_and_ecc() argument
175 single_bit_error_data(error_data, correct_data, size); in single_bit_error_in_data_and_ecc()
179 static void double_bit_error_in_ecc(void *error_data, void *error_ecc, in double_bit_error_in_ecc() argument
182 memcpy(error_data, correct_data, size); in double_bit_error_in_ecc()
186 static int double_bit_error_detect(void *error_data, void *error_ecc, in double_bit_error_detect() argument
193 ecc_sw_hamming_calculate(error_data, size, calc_ecc, sm_order); in double_bit_error_detect()
194 ret = ecc_sw_hamming_correct(error_data, error_ecc, calc_ecc, size, in double_bit_error_detect()
233 static void dump_data_ecc(void *error_data, void *error_ecc, void *correct_data, in dump_data_ecc() argument
238 error_data, size, false); in dump_data_ecc()
254 void *error_data; in nand_ecc_test_run() local
259 error_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
264 if (!error_data || !error_ecc || !correct_data || !correct_ecc) { in nand_ecc_test_run()
272 nand_ecc_test[i].prepare(error_data, error_ecc, in nand_ecc_test_run()
274 err = nand_ecc_test[i].verify(error_data, error_ecc, in nand_ecc_test_run()
280 dump_data_ecc(error_data, error_ecc, in nand_ecc_test_run()
292 kfree(error_data); in nand_ecc_test_run()