From: Hongfu Li <hongfu.li@linux.dev>
To: akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
surenb@google.com, mhocko@suse.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
hongfu.li@linux.dev, Hongfu Li <lihongfu@kylinos.cn>
Subject: [PATCH] mm/folio-compat: Drop superfluous return statements in void compat wrappers
Date: Fri, 17 Jul 2026 15:20:54 +0800 [thread overview]
Message-ID: <20260717072054.74260-1-hongfu.li@linux.dev> (raw)
From: Hongfu Li <lihongfu@kylinos.cn>
unlock_page(), end_page_writeback() and wait_on_page_writeback()
are void wrappers forwarding to folio-based functions which also
return void. Explicit return statements here are syntactically valid
but unnecessary, and inconsistent with other nearby compat helpers
such as mark_page_accessed() and set_page_writeback().
Drop all these superfluous return keywords.
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
---
mm/folio-compat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index a02179a0bded..8eb3e7fe4c91 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -13,19 +13,19 @@
void unlock_page(struct page *page)
{
- return folio_unlock(page_folio(page));
+ folio_unlock(page_folio(page));
}
EXPORT_SYMBOL(unlock_page);
void end_page_writeback(struct page *page)
{
- return folio_end_writeback(page_folio(page));
+ folio_end_writeback(page_folio(page));
}
EXPORT_SYMBOL(end_page_writeback);
void wait_on_page_writeback(struct page *page)
{
- return folio_wait_writeback(page_folio(page));
+ folio_wait_writeback(page_folio(page));
}
EXPORT_SYMBOL_GPL(wait_on_page_writeback);
--
2.54.0
next reply other threads:[~2026-07-17 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 7:20 Hongfu Li [this message]
2026-07-17 17:29 ` [PATCH] mm/folio-compat: Drop superfluous return statements in void compat wrappers Matthew Wilcox
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=20260717072054.74260-1-hongfu.li@linux.dev \
--to=hongfu.li@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=liam@infradead.org \
--cc=lihongfu@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox