From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,sui.jingfeng@linux.dev,akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] lib-scatterlist-use-sg_phys-helper.patch removed from -mm tree
Date: Tue, 05 Nov 2024 17:14:28 -0800 [thread overview]
Message-ID: <20241106011429.2DB2FC4CECF@smtp.kernel.org> (raw)
The quilt patch titled
Subject: lib/scatterlist: use sg_phys() helper
has been removed from the -mm tree. Its filename was
lib-scatterlist-use-sg_phys-helper.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Sui Jingfeng <sui.jingfeng@linux.dev>
Subject: lib/scatterlist: use sg_phys() helper
Date: Tue, 29 Oct 2024 02:29:20 +0800
This shorten the length of code in horizential direction, therefore is
easier to read.
Link: https://lkml.kernel.org/r/20241028182920.1025819-1-sui.jingfeng@linux.dev
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/scatterlist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/lib/scatterlist.c~lib-scatterlist-use-sg_phys-helper
+++ a/lib/scatterlist.c
@@ -474,14 +474,14 @@ int sg_alloc_append_table_from_pages(str
return -EOPNOTSUPP;
if (sgt_append->prv) {
- unsigned long next_pfn = (page_to_phys(sg_page(sgt_append->prv)) +
- sgt_append->prv->offset + sgt_append->prv->length) / PAGE_SIZE;
+ unsigned long next_pfn;
if (WARN_ON(offset))
return -EINVAL;
/* Merge contiguous pages into the last SG */
prv_len = sgt_append->prv->length;
+ next_pfn = (sg_phys(sgt_append->prv) + prv_len) / PAGE_SIZE;
if (page_to_pfn(pages[0]) == next_pfn) {
last_pg = pfn_to_page(next_pfn - 1);
while (n_pages && pages_are_mergeable(pages[0], last_pg)) {
_
Patches currently in -mm which might be from sui.jingfeng@linux.dev are
reply other threads:[~2024-11-06 1:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241106011429.2DB2FC4CECF@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=mm-commits@vger.kernel.org \
--cc=sui.jingfeng@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.