• Home
  • Raw
  • Download

Lines Matching refs:size

47 				size_t size)  in single_bit_error_data()  argument
49 unsigned int offset = prandom_u32() % (size * BITS_PER_BYTE); in single_bit_error_data()
51 memcpy(error_data, correct_data, size); in single_bit_error_data()
56 size_t size) in double_bit_error_data() argument
60 offset[0] = prandom_u32() % (size * BITS_PER_BYTE); in double_bit_error_data()
62 offset[1] = prandom_u32() % (size * BITS_PER_BYTE); in double_bit_error_data()
65 memcpy(error_data, correct_data, size); in double_bit_error_data()
71 static unsigned int random_ecc_bit(size_t size) in random_ecc_bit() argument
75 if (size == 256) { in random_ecc_bit()
88 size_t size) in single_bit_error_ecc() argument
90 unsigned int offset = random_ecc_bit(size); in single_bit_error_ecc()
97 size_t size) in double_bit_error_ecc() argument
101 offset[0] = random_ecc_bit(size); in double_bit_error_ecc()
103 offset[1] = random_ecc_bit(size); in double_bit_error_ecc()
112 void *correct_data, void *correct_ecc, const size_t size) in no_bit_error() argument
114 memcpy(error_data, correct_data, size); in no_bit_error()
119 void *correct_data, const size_t size) in no_bit_error_verify() argument
124 __nand_calculate_ecc(error_data, size, calc_ecc); in no_bit_error_verify()
125 ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); in no_bit_error_verify()
126 if (ret == 0 && !memcmp(correct_data, error_data, size)) in no_bit_error_verify()
133 void *correct_data, void *correct_ecc, const size_t size) in single_bit_error_in_data() argument
135 single_bit_error_data(error_data, correct_data, size); in single_bit_error_in_data()
140 void *correct_data, void *correct_ecc, const size_t size) in single_bit_error_in_ecc() argument
142 memcpy(error_data, correct_data, size); in single_bit_error_in_ecc()
143 single_bit_error_ecc(error_ecc, correct_ecc, size); in single_bit_error_in_ecc()
147 void *correct_data, const size_t size) in single_bit_error_correct() argument
152 __nand_calculate_ecc(error_data, size, calc_ecc); in single_bit_error_correct()
153 ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); in single_bit_error_correct()
154 if (ret == 1 && !memcmp(correct_data, error_data, size)) in single_bit_error_correct()
161 void *correct_data, void *correct_ecc, const size_t size) in double_bit_error_in_data() argument
163 double_bit_error_data(error_data, correct_data, size); in double_bit_error_in_data()
168 void *correct_data, void *correct_ecc, const size_t size) in single_bit_error_in_data_and_ecc() argument
170 single_bit_error_data(error_data, correct_data, size); in single_bit_error_in_data_and_ecc()
171 single_bit_error_ecc(error_ecc, correct_ecc, size); in single_bit_error_in_data_and_ecc()
175 void *correct_data, void *correct_ecc, const size_t size) in double_bit_error_in_ecc() argument
177 memcpy(error_data, correct_data, size); in double_bit_error_in_ecc()
178 double_bit_error_ecc(error_ecc, correct_ecc, size); in double_bit_error_in_ecc()
182 void *correct_data, const size_t size) in double_bit_error_detect() argument
187 __nand_calculate_ecc(error_data, size, calc_ecc); in double_bit_error_detect()
188 ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); in double_bit_error_detect()
227 void *correct_ecc, const size_t size) in dump_data_ecc() argument
231 error_data, size, false); in dump_data_ecc()
237 correct_data, size, false); in dump_data_ecc()
242 static int nand_ecc_test_run(const size_t size) in nand_ecc_test_run() argument
251 error_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
253 correct_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
261 prandom_bytes(correct_data, size); in nand_ecc_test_run()
262 __nand_calculate_ecc(correct_data, size, correct_ecc); in nand_ecc_test_run()
266 correct_data, correct_ecc, size); in nand_ecc_test_run()
268 correct_data, size); in nand_ecc_test_run()
272 nand_ecc_test[i].name, size); in nand_ecc_test_run()
274 correct_data, correct_ecc, size); in nand_ecc_test_run()
278 nand_ecc_test[i].name, size); in nand_ecc_test_run()
295 static int nand_ecc_test_run(const size_t size) in nand_ecc_test_run() argument