From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,sj@kernel.org,yangqixiao@inspur.com,akpm@linux-foundation.org
Subject: + mm-damon-paddr-initialize-folio-variables-to-null-for-clarity.patch added to mm-new branch
Date: Wed, 07 Jan 2026 18:36:58 -0800 [thread overview]
Message-ID: <20260108023659.480FDC4CEF1@smtp.kernel.org> (raw)
The patch titled
Subject: mm/damon/paddr: initialize 'folio' variables to NULL for clarity
has been added to the -mm mm-new branch. Its filename is
mm-damon-paddr-initialize-folio-variables-to-null-for-clarity.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-paddr-initialize-folio-variables-to-null-for-clarity.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
The mm-new branch of mm.git is not included in linux-next
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Aaron Yang <yangqixiao@inspur.com>
Subject: mm/damon/paddr: initialize 'folio' variables to NULL for clarity
Date: Wed, 7 Jan 2026 17:30:38 -0800
In damon_pa_mark_accessed_or_deactivate(), damon_pa_pageout(),
damon_pa_migrate(), and damon_pa_stat(), the local variable 'folio' is
declared but not initialized.
Initialize 'folio' to NULL to improve code readability and
maintainability.
Link: https://patch.msgid.link/20260104013255.16962-1-yangqixiao@inspur.com
Link: https://lkml.kernel.org/r/20260108013041.80601-1-sj@kernel.org
Signed-off-by: Aaron Yang <yangqixiao@inspur.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/damon/paddr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/mm/damon/paddr.c~mm-damon-paddr-initialize-folio-variables-to-null-for-clarity
+++ a/mm/damon/paddr.c
@@ -156,7 +156,7 @@ static unsigned long damon_pa_pageout(st
LIST_HEAD(folio_list);
bool install_young_filter = true;
struct damos_filter *filter;
- struct folio *folio;
+ struct folio *folio = NULL;
/* check access in page level again by default */
damos_for_each_ops_filter(filter, s) {
@@ -212,7 +212,7 @@ static inline unsigned long damon_pa_mar
unsigned long *sz_filter_passed)
{
phys_addr_t addr, applied = 0;
- struct folio *folio;
+ struct folio *folio = NULL;
addr = damon_pa_phys_addr(r->ar.start, addr_unit);
while (addr < damon_pa_phys_addr(r->ar.end, addr_unit)) {
@@ -262,7 +262,7 @@ static unsigned long damon_pa_migrate(st
{
phys_addr_t addr, applied;
LIST_HEAD(folio_list);
- struct folio *folio;
+ struct folio *folio = NULL;
addr = damon_pa_phys_addr(r->ar.start, addr_unit);
while (addr < damon_pa_phys_addr(r->ar.end, addr_unit)) {
@@ -295,7 +295,7 @@ static unsigned long damon_pa_stat(struc
unsigned long *sz_filter_passed)
{
phys_addr_t addr;
- struct folio *folio;
+ struct folio *folio = NULL;
if (!damos_ops_has_filter(s))
return 0;
_
Patches currently in -mm which might be from yangqixiao@inspur.com are
mm-damon-paddr-initialize-folio-variables-to-null-for-clarity.patch
reply other threads:[~2026-01-08 2:36 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=20260108023659.480FDC4CEF1@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=mm-commits@vger.kernel.org \
--cc=sj@kernel.org \
--cc=yangqixiao@inspur.com \
/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.