Lines Matching full:size

48 				size_t size)  in single_bit_error_data()  argument
50 unsigned int offset = prandom_u32() % (size * BITS_PER_BYTE); in single_bit_error_data()
52 memcpy(error_data, correct_data, size); in single_bit_error_data()
57 size_t size) in double_bit_error_data() argument
61 offset[0] = prandom_u32() % (size * BITS_PER_BYTE); in double_bit_error_data()
63 offset[1] = prandom_u32() % (size * BITS_PER_BYTE); in double_bit_error_data()
66 memcpy(error_data, correct_data, size); in double_bit_error_data()
72 static unsigned int random_ecc_bit(size_t size) in random_ecc_bit() argument
76 if (size == 256) { in random_ecc_bit()
89 size_t size) in single_bit_error_ecc() argument
91 unsigned int offset = random_ecc_bit(size); in single_bit_error_ecc()
98 size_t size) in double_bit_error_ecc() argument
102 offset[0] = random_ecc_bit(size); in double_bit_error_ecc()
104 offset[1] = random_ecc_bit(size); in double_bit_error_ecc()
113 void *correct_data, void *correct_ecc, const size_t size) in no_bit_error() argument
115 memcpy(error_data, correct_data, size); in no_bit_error()
120 void *correct_data, const size_t size) in no_bit_error_verify() argument
125 __nand_calculate_ecc(error_data, size, calc_ecc, in no_bit_error_verify()
127 ret = __nand_correct_data(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()
136 void *correct_data, void *correct_ecc, const size_t size) in single_bit_error_in_data() argument
138 single_bit_error_data(error_data, correct_data, size); in single_bit_error_in_data()
143 void *correct_data, void *correct_ecc, const size_t size) in single_bit_error_in_ecc() argument
145 memcpy(error_data, correct_data, size); in single_bit_error_in_ecc()
146 single_bit_error_ecc(error_ecc, correct_ecc, size); in single_bit_error_in_ecc()
150 void *correct_data, const size_t size) in single_bit_error_correct() argument
155 __nand_calculate_ecc(error_data, size, calc_ecc, in single_bit_error_correct()
157 ret = __nand_correct_data(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()
166 void *correct_data, void *correct_ecc, const size_t size) in double_bit_error_in_data() argument
168 double_bit_error_data(error_data, correct_data, size); in double_bit_error_in_data()
173 void *correct_data, void *correct_ecc, const size_t size) 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()
176 single_bit_error_ecc(error_ecc, correct_ecc, size); in single_bit_error_in_data_and_ecc()
180 void *correct_data, void *correct_ecc, const size_t size) in double_bit_error_in_ecc() argument
182 memcpy(error_data, correct_data, size); in double_bit_error_in_ecc()
183 double_bit_error_ecc(error_ecc, correct_ecc, size); in double_bit_error_in_ecc()
187 void *correct_data, const size_t size) in double_bit_error_detect() argument
192 __nand_calculate_ecc(error_data, size, calc_ecc, in double_bit_error_detect()
194 ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size, in double_bit_error_detect()
234 void *correct_ecc, const size_t size) in dump_data_ecc() argument
238 error_data, size, false); in dump_data_ecc()
244 correct_data, size, false); in dump_data_ecc()
249 static int nand_ecc_test_run(const size_t size) in nand_ecc_test_run() argument
258 error_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
260 correct_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
268 prandom_bytes(correct_data, size); in nand_ecc_test_run()
269 __nand_calculate_ecc(correct_data, size, correct_ecc, in nand_ecc_test_run()
274 correct_data, correct_ecc, size); in nand_ecc_test_run()
276 correct_data, size); in nand_ecc_test_run()
280 nand_ecc_test[i].name, size); in nand_ecc_test_run()
282 correct_data, correct_ecc, size); in nand_ecc_test_run()
286 nand_ecc_test[i].name, size); in nand_ecc_test_run()
303 static int nand_ecc_test_run(const size_t size) in nand_ecc_test_run() argument