Lines Matching refs:size

48 				size_t size)  in single_bit_error_data()  argument
50 unsigned int offset = prandom_u32_max(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_max(size * BITS_PER_BYTE); in double_bit_error_data()
63 offset[1] = prandom_u32_max(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
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()
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
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()
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
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()
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
259 error_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
261 correct_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
269 get_random_bytes(correct_data, size); in nand_ecc_test_run()
270 ecc_sw_hamming_calculate(correct_data, size, correct_ecc, sm_order); in nand_ecc_test_run()
273 correct_data, correct_ecc, size); in nand_ecc_test_run()
275 correct_data, size); in nand_ecc_test_run()
279 nand_ecc_test[i].name, size); in nand_ecc_test_run()
281 correct_data, correct_ecc, size); in nand_ecc_test_run()
285 nand_ecc_test[i].name, size); in nand_ecc_test_run()
302 static int nand_ecc_test_run(const size_t size) in nand_ecc_test_run() argument