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.

mmc: 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-30-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: Alex Dubov <oakad@yahoo.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Lars Persson <lars.persson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand and committed by
Andrew Morton
727fd054 a1f4c374

+4 -4
+2 -2
drivers/mmc/host/tifm_sd.c
··· 191 191 } 192 192 off = sg[host->sg_pos].offset + host->block_pos; 193 193 194 - pg = nth_page(sg_page(&sg[host->sg_pos]), off >> PAGE_SHIFT); 194 + pg = sg_page(&sg[host->sg_pos]) + (off >> PAGE_SHIFT); 195 195 p_off = offset_in_page(off); 196 196 p_cnt = PAGE_SIZE - p_off; 197 197 p_cnt = min(p_cnt, cnt); ··· 240 240 } 241 241 off = sg[host->sg_pos].offset + host->block_pos; 242 242 243 - pg = nth_page(sg_page(&sg[host->sg_pos]), off >> PAGE_SHIFT); 243 + pg = sg_page(&sg[host->sg_pos]) + (off >> PAGE_SHIFT); 244 244 p_off = offset_in_page(off); 245 245 p_cnt = PAGE_SIZE - p_off; 246 246 p_cnt = min(p_cnt, cnt);
+2 -2
drivers/mmc/host/usdhi6rol0.c
··· 323 323 324 324 host->head_pg.page = host->pg.page; 325 325 host->head_pg.mapped = host->pg.mapped; 326 - host->pg.page = nth_page(host->pg.page, 1); 326 + host->pg.page = host->pg.page + 1; 327 327 host->pg.mapped = kmap(host->pg.page); 328 328 329 329 host->blk_page = host->bounce_buf; ··· 503 503 /* We cannot get here after crossing a page border */ 504 504 505 505 /* Next page in the same SG */ 506 - host->pg.page = nth_page(sg_page(host->sg), host->page_idx); 506 + host->pg.page = sg_page(host->sg) + host->page_idx; 507 507 host->pg.mapped = kmap(host->pg.page); 508 508 host->blk_page = host->pg.mapped; 509 509