lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFrMR2bfnra1hWiLwqTqt7AFgALHzYCn+35PqU_wq+GhBA@mail.gmail.com>
Date: Fri, 22 Aug 2025 11:58:26 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org, 
	linux-mm@...ck.org
Subject: Re: [PATCH RFC 27/35] memstick: drop nth_page() usage within SG entry

- trimmed cc-list

On Thu, 21 Aug 2025 at 22:08, David Hildenbrand <david@...hat.com> 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.
>
> Cc: Maxim Levitsky <maximlevitsky@...il.com>
> Cc: Alex Dubov <oakad@...oo.com>
> Cc: Ulf Hansson <ulf.hansson@...aro.org>
> Signed-off-by: David Hildenbrand <david@...hat.com>

Acked-by: Ulf Hansson <ulf.hansson@...aro.org>

Kind regards
Uffe



> ---
>  drivers/memstick/host/jmb38x_ms.c | 3 +--
>  drivers/memstick/host/tifm_ms.c   | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
> index cddddb3a5a27f..c5e71d39ffd51 100644
> --- a/drivers/memstick/host/jmb38x_ms.c
> +++ b/drivers/memstick/host/jmb38x_ms.c
> @@ -317,8 +317,7 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
>                 unsigned int p_off;
>
>                 if (host->req->long_data) {
> -                       pg = nth_page(sg_page(&host->req->sg),
> -                                     off >> PAGE_SHIFT);
> +                       pg = sg_page(&host->req->sg) + off / PAGE_SIZE;
>                         p_off = offset_in_page(off);
>                         p_cnt = PAGE_SIZE - p_off;
>                         p_cnt = min(p_cnt, length);
> diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c
> index db7f3a088fb09..0d64184ca10a9 100644
> --- a/drivers/memstick/host/tifm_ms.c
> +++ b/drivers/memstick/host/tifm_ms.c
> @@ -201,8 +201,7 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
>                 unsigned int p_off;
>
>                 if (host->req->long_data) {
> -                       pg = nth_page(sg_page(&host->req->sg),
> -                                     off >> PAGE_SHIFT);
> +                       pg = sg_page(&host->req->sg) + off / PAGE_SIZE;
>                         p_off = offset_in_page(off);
>                         p_cnt = PAGE_SIZE - p_off;
>                         p_cnt = min(p_cnt, length);
> --
> 2.50.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ