mm/folio-compat: Drop superfluous return statements in void compat wrappers
Subsystems (2)
PATCH 1/1 mm/folio-compat: Drop superfluous return statements in void compat wrappers
From: Hongfu Li <[email protected]>
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.
--- mm/folio-compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/folio-compat.c +3 -3
@@ -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);
Signature · 1 line
2.54.0
Quoted 11 lines · Hongfu Li
From: Hongfu Li <[email protected]>
unlock_page(),end_page_writeback()andwait_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 asmark_page_accessed()andset_page_writeback().Drop all these superfluous return keywords.
Signed-off-by Hongfu Li <[email protected]>
LGTM so:
I would ask that you maybe slow down on the flow of patches lately :) review is pretty overwhelmed atm.
Quoted 32 lines
--- mm/folio-compat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)mm/folio-compat.c +3
-4@@ -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); --
Quoted 2 lines
2.54.0
Thanks, Lorenzo
Quoted 11 lines · Lorenzo Stoakes (ARM)
Quoted 10 lines · Hongfu Li
From: Hongfu Li <[email protected]>
unlock_page(),end_page_writeback()andwait_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 asmark_page_accessed()andset_page_writeback().Drop all these superfluous return keywords.
Quoted 8 lines
Quoted 1 line
Signed-off-by Hongfu Li <[email protected]>LGTM so:
Reviewed-by Lorenzo Stoakes (ARM) <[email protected]>I would ask that you maybe slow down on the flow of patches lately :) review is pretty overwhelmed atm.
Exactly.
Signature · 3 lines
Cheers, David
Quoted 10 lines
Quoted 10 lines
From: Hongfu Li <[email protected]>
unlock_page(),end_page_writeback()andwait_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 asmark_page_accessed()andset_page_writeback().Drop all these superfluous return keywords.
Quoted 8 lines
Quoted 1 line
Signed-off-by Hongfu Li <[email protected]>LGTM so:
Reviewed-by Lorenzo Stoakes (ARM) <[email protected]>I would ask that you maybe slow down on the flow of patches lately :) review is pretty overwhelmed atm.
Sorry about the heavy patch stream recently.
I'll space out my patch submissions to reduce review pressure. Really appreciate your time and careful review.
Best regards,
Hongfu
Quoted 9 lines · Hongfu Li
From: Hongfu Li <[email protected]>
unlock_page(),end_page_writeback()andwait_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 asmark_page_accessed()andset_page_writeback().Drop all these superfluous return keywords.
why bother? this file is temporary scaffolding. if they offend you so much, work on removing the need for them.
Quoted 8 lines
Quoted 8 lines
From: Hongfu Li <[email protected]>
unlock_page(),end_page_writeback()andwait_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 asmark_page_accessed()andset_page_writeback().
Quoted 4 lines
Quoted 1 line
Drop all these superfluous return keywords.
why bother? this file is temporary scaffolding. if they offend you so much, work on removing the need for them.
Thanks a lot for your comments.
I fully agree with your point. You've already made great progress cleaning up this temporary scaffolding. I will follow your lead and keep working on reducing usages of these helper functions.
Best regards,
Hongfu
David Hildenbrand (Arm)
maintainerQuoted 10 lines · Hongfu Li
Quoted 10 lines
Quoted 9 lines
From: Hongfu Li <[email protected]>
unlock_page(),end_page_writeback()andwait_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 asmark_page_accessed()andset_page_writeback().Drop all these superfluous return keywords.
Quoted 8 lines
Quoted 2 lines
why bother? this file is temporary scaffolding. if they offend you so much, work on removing the need for them.
Thanks a lot for your comments.
I fully agree with your point. You've already made great progress cleaning up this temporary scaffolding. I will follow your lead and keep working on reducing usages of these helper functions.
As much as I agree, this patch here is perfectly fine.
Signature · 3 lines
Cheers, David