[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0ff494d-9e34-46ea-8b32-bd650bc3b74a@lucifer.local>
Date: Thu, 28 Aug 2025 18:59:38 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, Ulf Hansson <ulf.hansson@...aro.org>,
Alex Dubov <oakad@...oo.com>, Jesper Nilsson <jesper.nilsson@...s.com>,
Lars Persson <lars.persson@...s.com>,
Alexander Potapenko <glider@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Brendan Jackman <jackmanb@...gle.com>,
Christoph Lameter <cl@...two.org>, Dennis Zhou <dennis@...nel.org>,
Dmitry Vyukov <dvyukov@...gle.com>, dri-devel@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, iommu@...ts.linux.dev,
io-uring@...r.kernel.org, Jason Gunthorpe <jgg@...dia.com>,
Jens Axboe <axboe@...nel.dk>, Johannes Weiner <hannes@...xchg.org>,
John Hubbard <jhubbard@...dia.com>, kasan-dev@...glegroups.com,
kvm@...r.kernel.org, "Liam R. Howlett" <Liam.Howlett@...cle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-arm-kernel@...s.com, linux-arm-kernel@...ts.infradead.org,
linux-crypto@...r.kernel.org, linux-ide@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-mips@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-mm@...ck.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-scsi@...r.kernel.org, Marco Elver <elver@...gle.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Michal Hocko <mhocko@...e.com>, Mike Rapoport <rppt@...nel.org>,
Muchun Song <muchun.song@...ux.dev>, netdev@...r.kernel.org,
Oscar Salvador <osalvador@...e.de>, Peter Xu <peterx@...hat.com>,
Robin Murphy <robin.murphy@....com>,
Suren Baghdasaryan <surenb@...gle.com>, Tejun Heo <tj@...nel.org>,
virtualization@...ts.linux.dev, Vlastimil Babka <vbabka@...e.cz>,
wireguard@...ts.zx2c4.com, x86@...nel.org, Zi Yan <ziy@...dia.com>
Subject: Re: [PATCH v1 28/36] mmc: drop nth_page() usage within SG entry
On Thu, Aug 28, 2025 at 12:01:32AM +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 <ulf.hansson@...aro.org>
> Cc: Alex Dubov <oakad@...oo.com>
> Cc: Ulf Hansson <ulf.hansson@...aro.org>
> Cc: Jesper Nilsson <jesper.nilsson@...s.com>
> Cc: Lars Persson <lars.persson@...s.com>
> Signed-off-by: David Hildenbrand <david@...hat.com>
LGTM, so:
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> ---
> drivers/mmc/host/tifm_sd.c | 4 ++--
> drivers/mmc/host/usdhi6rol0.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c
> index ac636efd911d3..2cd69c9e9571b 100644
> --- a/drivers/mmc/host/tifm_sd.c
> +++ b/drivers/mmc/host/tifm_sd.c
> @@ -191,7 +191,7 @@ static void tifm_sd_transfer_data(struct tifm_sd *host)
> }
> off = sg[host->sg_pos].offset + host->block_pos;
>
> - pg = nth_page(sg_page(&sg[host->sg_pos]), off >> PAGE_SHIFT);
> + pg = sg_page(&sg[host->sg_pos]) + (off >> PAGE_SHIFT);
> p_off = offset_in_page(off);
> p_cnt = PAGE_SIZE - p_off;
> p_cnt = min(p_cnt, cnt);
> @@ -240,7 +240,7 @@ static void tifm_sd_bounce_block(struct tifm_sd *host, struct mmc_data *r_data)
> }
> off = sg[host->sg_pos].offset + host->block_pos;
>
> - pg = nth_page(sg_page(&sg[host->sg_pos]), off >> PAGE_SHIFT);
> + pg = sg_page(&sg[host->sg_pos]) + (off >> PAGE_SHIFT);
> p_off = offset_in_page(off);
> p_cnt = PAGE_SIZE - p_off;
> p_cnt = min(p_cnt, cnt);
> diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
> index 85b49c07918b3..3bccf800339ba 100644
> --- a/drivers/mmc/host/usdhi6rol0.c
> +++ b/drivers/mmc/host/usdhi6rol0.c
> @@ -323,7 +323,7 @@ static void usdhi6_blk_bounce(struct usdhi6_host *host,
>
> host->head_pg.page = host->pg.page;
> host->head_pg.mapped = host->pg.mapped;
> - host->pg.page = nth_page(host->pg.page, 1);
> + host->pg.page = host->pg.page + 1;
> host->pg.mapped = kmap(host->pg.page);
>
> host->blk_page = host->bounce_buf;
> @@ -503,7 +503,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host)
> /* We cannot get here after crossing a page border */
>
> /* Next page in the same SG */
> - host->pg.page = nth_page(sg_page(host->sg), host->page_idx);
> + host->pg.page = sg_page(host->sg) + host->page_idx;
> host->pg.mapped = kmap(host->pg.page);
> host->blk_page = host->pg.mapped;
>
> --
> 2.50.1
>
Powered by blists - more mailing lists