Thread (140 messages) 140 messages, 13 authors, 2025-09-01

Re: [PATCH v1 26/36] mspro_block: drop nth_page() usage within SG entry

From: Lorenzo Stoakes <hidden>
Date: 2025-08-28 17:57:57
Also in: dri-devel, intel-gfx, io-uring, kvm, linux-crypto, linux-ide, linux-iommu, linux-kselftest, linux-mips, linux-mm, linux-mmc, linux-riscv, linux-s390, linux-scsi, lkml, virtualization

On Thu, Aug 28, 2025 at 12:01:30AM +0200, David Hildenbrand wrote:
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.

Acked-by: Ulf Hansson <redacted>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Ulf Hansson <redacted>
Signed-off-by: David Hildenbrand <redacted>
LGTM, so:

Reviewed-by: Lorenzo Stoakes <redacted>
quoted hunk ↗ jump to hunk
---
 drivers/memstick/core/mspro_block.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index c9853d887d282..d3f160dc0da4c 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -560,8 +560,7 @@ static int h_mspro_block_transfer_data(struct memstick_dev *card,
 		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
--
2.50.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help