Lines Matching full:pr
80 const struct kvec_test_range *pr) in iov_kunit_load_kvec() argument
85 for (i = 0; i < kvmax; i++, pr++) { in iov_kunit_load_kvec()
86 if (pr->from < 0) in iov_kunit_load_kvec()
88 KUNIT_ASSERT_GE(test, pr->to, pr->from); in iov_kunit_load_kvec()
89 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_load_kvec()
90 kvec[i].iov_base = buffer + pr->from; in iov_kunit_load_kvec()
91 kvec[i].iov_len = pr->to - pr->from; in iov_kunit_load_kvec()
92 size += pr->to - pr->from; in iov_kunit_load_kvec()
104 const struct kvec_test_range *pr; in iov_kunit_copy_to_kvec() local
135 for (pr = kvec_test_ranges; pr->from >= 0; pr++) in iov_kunit_copy_to_kvec()
136 for (i = pr->from; i < pr->to; i++) in iov_kunit_copy_to_kvec()
154 const struct kvec_test_range *pr; in iov_kunit_copy_from_kvec() local
185 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_from_kvec()
186 for (j = pr->from; j < pr->to; j++) { in iov_kunit_copy_from_kvec()
225 const struct bvec_test_range *pr) in iov_kunit_load_bvec() argument
231 for (i = 0; i < bvmax; i++, pr++) { in iov_kunit_load_bvec()
232 if (pr->from < 0) in iov_kunit_load_bvec()
234 KUNIT_ASSERT_LT(test, pr->page, npages); in iov_kunit_load_bvec()
235 KUNIT_ASSERT_LT(test, pr->page * PAGE_SIZE, bufsize); in iov_kunit_load_bvec()
236 KUNIT_ASSERT_GE(test, pr->from, 0); in iov_kunit_load_bvec()
237 KUNIT_ASSERT_GE(test, pr->to, pr->from); in iov_kunit_load_bvec()
238 KUNIT_ASSERT_LE(test, pr->to, PAGE_SIZE); in iov_kunit_load_bvec()
240 page = pages[pr->page]; in iov_kunit_load_bvec()
241 if (pr->from == 0 && pr->from != pr->to && page == can_merge) { in iov_kunit_load_bvec()
243 bvec[i].bv_len += pr->to; in iov_kunit_load_bvec()
245 bvec_set_page(&bvec[i], page, pr->to - pr->from, pr->from); in iov_kunit_load_bvec()
248 size += pr->to - pr->from; in iov_kunit_load_bvec()
249 if ((pr->to & ~PAGE_MASK) == 0) in iov_kunit_load_bvec()
250 can_merge = page + pr->to / PAGE_SIZE; in iov_kunit_load_bvec()
263 const struct bvec_test_range *pr; in iov_kunit_copy_to_bvec() local
295 for (pr = bvec_test_ranges; pr->from >= 0; pr++, b++) { in iov_kunit_copy_to_bvec()
296 u8 *p = scratch + pr->page * PAGE_SIZE; in iov_kunit_copy_to_bvec()
298 for (i = pr->from; i < pr->to; i++) in iov_kunit_copy_to_bvec()
317 const struct bvec_test_range *pr; in iov_kunit_copy_from_bvec() local
348 for (pr = bvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_from_bvec()
349 size_t patt = pr->page * PAGE_SIZE; in iov_kunit_copy_from_bvec()
351 for (j = pr->from; j < pr->to; j++) { in iov_kunit_copy_from_bvec()
421 const struct kvec_test_range *pr; in iov_kunit_copy_to_folioq() local
444 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_to_folioq()
445 size = pr->to - pr->from; in iov_kunit_copy_to_folioq()
446 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_copy_to_folioq()
448 iov_iter_folio_queue(&iter, READ, folioq, 0, 0, pr->to); in iov_kunit_copy_to_folioq()
449 iov_iter_advance(&iter, pr->from); in iov_kunit_copy_to_folioq()
454 KUNIT_EXPECT_EQ(test, iter.iov_offset, pr->to % PAGE_SIZE); in iov_kunit_copy_to_folioq()
463 for (pr = kvec_test_ranges; pr->from >= 0; pr++) in iov_kunit_copy_to_folioq()
464 for (i = pr->from; i < pr->to; i++) in iov_kunit_copy_to_folioq()
483 const struct kvec_test_range *pr; in iov_kunit_copy_from_folioq() local
506 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_from_folioq()
507 size = pr->to - pr->from; in iov_kunit_copy_from_folioq()
508 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_copy_from_folioq()
510 iov_iter_folio_queue(&iter, WRITE, folioq, 0, 0, pr->to); in iov_kunit_copy_from_folioq()
511 iov_iter_advance(&iter, pr->from); in iov_kunit_copy_from_folioq()
516 KUNIT_EXPECT_EQ(test, iter.iov_offset, pr->to % PAGE_SIZE); in iov_kunit_copy_from_folioq()
523 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_from_folioq()
524 for (j = pr->from; j < pr->to; j++) { in iov_kunit_copy_from_folioq()
583 const struct kvec_test_range *pr; in iov_kunit_copy_to_xarray() local
606 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_to_xarray()
607 size = pr->to - pr->from; in iov_kunit_copy_to_xarray()
608 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_copy_to_xarray()
610 iov_iter_xarray(&iter, READ, xarray, pr->from, size); in iov_kunit_copy_to_xarray()
622 for (pr = kvec_test_ranges; pr->from >= 0; pr++) in iov_kunit_copy_to_xarray()
623 for (i = pr->from; i < pr->to; i++) in iov_kunit_copy_to_xarray()
641 const struct kvec_test_range *pr; in iov_kunit_copy_from_xarray() local
664 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_from_xarray()
665 size = pr->to - pr->from; in iov_kunit_copy_from_xarray()
666 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_copy_from_xarray()
668 iov_iter_xarray(&iter, WRITE, xarray, pr->from, size); in iov_kunit_copy_from_xarray()
680 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_copy_from_xarray()
681 for (j = pr->from; j < pr->to; j++) { in iov_kunit_copy_from_xarray()
704 const struct kvec_test_range *pr; in iov_kunit_extract_pages_kvec() local
722 pr = kvec_test_ranges; in iov_kunit_extract_pages_kvec()
723 from = pr->from; in iov_kunit_extract_pages_kvec()
750 while (from == pr->to) { in iov_kunit_extract_pages_kvec()
751 pr++; in iov_kunit_extract_pages_kvec()
752 from = pr->from; in iov_kunit_extract_pages_kvec()
784 const struct bvec_test_range *pr; in iov_kunit_extract_pages_bvec() local
800 pr = bvec_test_ranges; in iov_kunit_extract_pages_bvec()
801 from = pr->from; in iov_kunit_extract_pages_bvec()
828 while (from == pr->to) { in iov_kunit_extract_pages_bvec()
829 pr++; in iov_kunit_extract_pages_bvec()
830 from = pr->from; in iov_kunit_extract_pages_bvec()
834 ix = pr->page + from / PAGE_SIZE; in iov_kunit_extract_pages_bvec()
862 const struct kvec_test_range *pr; in iov_kunit_extract_pages_folioq() local
878 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_extract_pages_folioq()
879 from = pr->from; in iov_kunit_extract_pages_folioq()
880 size = pr->to - from; in iov_kunit_extract_pages_folioq()
881 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_extract_pages_folioq()
883 iov_iter_folio_queue(&iter, WRITE, folioq, 0, 0, pr->to); in iov_kunit_extract_pages_folioq()
941 const struct kvec_test_range *pr; in iov_kunit_extract_pages_xarray() local
957 for (pr = kvec_test_ranges; pr->from >= 0; pr++) { in iov_kunit_extract_pages_xarray()
958 from = pr->from; in iov_kunit_extract_pages_xarray()
959 size = pr->to - from; in iov_kunit_extract_pages_xarray()
960 KUNIT_ASSERT_LE(test, pr->to, bufsize); in iov_kunit_extract_pages_xarray()
1008 KUNIT_EXPECT_EQ(test, iter.iov_offset, pr->to - pr->from); in iov_kunit_extract_pages_xarray()