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.

mspro_block: 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-28-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
58f2c185 f3dd2237

+1 -2
+1 -2
drivers/memstick/core/mspro_block.c
··· 560 560 t_offset += msb->current_page * msb->page_size; 561 561 562 562 sg_set_page(&t_sg, 563 - nth_page(sg_page(&(msb->req_sg[msb->current_seg])), 564 - t_offset >> PAGE_SHIFT), 563 + sg_page(&(msb->req_sg[msb->current_seg])) + (t_offset >> PAGE_SHIFT), 565 564 msb->page_size, offset_in_page(t_offset)); 566 565 567 566 memstick_init_req_sg(*mrq, msb->data_dir == READ