Lines Matching refs:i
25 int err = -ENOMEM, i, r, total = 0; in test_memcat_p_init() local
35 for (i = 0, r = 1; i < INPUT_MAX - 1; i++) { in test_memcat_p_init()
36 in0[i] = kmalloc(sizeof(**in0), GFP_KERNEL); in test_memcat_p_init()
37 if (!in0[i]) in test_memcat_p_init()
40 in1[i] = kmalloc(sizeof(**in1), GFP_KERNEL); in test_memcat_p_init()
41 if (!in1[i]) { in test_memcat_p_init()
42 kfree(in0[i]); in test_memcat_p_init()
48 in0[i]->num = r; in test_memcat_p_init()
49 in1[i]->num = -r; in test_memcat_p_init()
50 in0[i]->magic = MAGIC; in test_memcat_p_init()
51 in1[i]->magic = MAGIC; in test_memcat_p_init()
54 in0[i] = in1[i] = NULL; in test_memcat_p_init()
61 for (i = 0, p = out; *p && (i < INPUT_MAX * 2 - 1); p++, i++) { in test_memcat_p_init()
65 pr_err("test failed: wrong magic at %d: %u\n", i, in test_memcat_p_init()
76 if (i != EXPECT) { in test_memcat_p_init()
78 EXPECT, i); in test_memcat_p_init()
82 for (i = 0; i < INPUT_MAX - 1; i++) in test_memcat_p_init()
83 if (out[i] != in0[i] || out[i + INPUT_MAX - 1] != in1[i]) { in test_memcat_p_init()
84 pr_err("test failed: wrong element order at %d\n", i); in test_memcat_p_init()
94 i = INPUT_MAX; in test_memcat_p_init()
96 for (i--; i >= 0; i--) { in test_memcat_p_init()
97 kfree(in1[i]); in test_memcat_p_init()
98 kfree(in0[i]); in test_memcat_p_init()