Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memstick: drop nth_page() usage within SG entry

It's no longer required to use nth_page() when iterating pages within a
single SG entry, so let's drop the nth_page() usage.

Link: https://lkml.kernel.org/r/20250901150359.867252-29-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand and committed by
Andrew Morton
a1f4c374 58f2c185

+2 -4
+1 -2
drivers/memstick/host/jmb38x_ms.c
··· 317 317 unsigned int p_off; 318 318 319 319 if (host->req->long_data) { 320 - pg = nth_page(sg_page(&host->req->sg), 321 - off >> PAGE_SHIFT); 320 + pg = sg_page(&host->req->sg) + (off >> PAGE_SHIFT); 322 321 p_off = offset_in_page(off); 323 322 p_cnt = PAGE_SIZE - p_off; 324 323 p_cnt = min(p_cnt, length);
+1 -2
drivers/memstick/host/tifm_ms.c
··· 201 201 unsigned int p_off; 202 202 203 203 if (host->req->long_data) { 204 - pg = nth_page(sg_page(&host->req->sg), 205 - off >> PAGE_SHIFT); 204 + pg = sg_page(&host->req->sg) + (off >> PAGE_SHIFT); 206 205 p_off = offset_in_page(off); 207 206 p_cnt = PAGE_SIZE - p_off; 208 207 p_cnt = min(p_cnt, length);