]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mspro_block: drop nth_page() usage within SG entry
authorDavid Hildenbrand <david@redhat.com>
Mon, 1 Sep 2025 15:03:48 +0000 (17:03 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:36 +0000 (17:25 -0700)
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>
drivers/memstick/core/mspro_block.c

index c9853d887d2822632b9d76da0cb101dfc3598a74..d3f160dc0da4c6d34dfb18616a0fd6e3ba89b492 100644 (file)
@@ -560,8 +560,7 @@ has_int_reg:
                t_offset += msb->current_page * msb->page_size;
 
                sg_set_page(&t_sg,
-                           nth_page(sg_page(&(msb->req_sg[msb->current_seg])),
-                                    t_offset >> PAGE_SHIFT),
+                           sg_page(&(msb->req_sg[msb->current_seg])) + (t_offset >> PAGE_SHIFT),
                            msb->page_size, offset_in_page(t_offset));
 
                memstick_init_req_sg(*mrq, msb->data_dir == READ