[2/4] mm/page_alloc.c: rename free_pages_check_bad() to check_free_page_bad()
diff mbox series

Message ID 20200119131408.23247-3-richardw.yang@linux.intel.com
State New
Headers show
Series
  • mm/page_alloc.c: cleanup on check page
Related show

Commit Message

Wei Yang Jan. 19, 2020, 1:14 p.m. UTC
free_pages_check_bad() is the counterpart of check_new_page_bad(), while
their naming convention is a little different.

Use verb at first and singular form.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Rientjes Jan. 19, 2020, 10:07 p.m. UTC | #1
On Sun, 19 Jan 2020, Wei Yang wrote:

> free_pages_check_bad() is the counterpart of check_new_page_bad(), while
> their naming convention is a little different.
> 
> Use verb at first and singular form.
> 

I think if you agree with the suggestion in patch 1/4 to fix the issue 
with bad page reporting that it would likely be better to fold patches 2 
and 3 into that change.
Wei Yang Jan. 20, 2020, 12:36 a.m. UTC | #2
On Sun, Jan 19, 2020 at 02:07:04PM -0800, David Rientjes wrote:
>On Sun, 19 Jan 2020, Wei Yang wrote:
>
>> free_pages_check_bad() is the counterpart of check_new_page_bad(), while
>> their naming convention is a little different.
>> 
>> Use verb at first and singular form.
>> 
>
>I think if you agree with the suggestion in patch 1/4 to fix the issue 
>with bad page reporting that it would likely be better to fold patches 2 
>and 3 into that change.

I am ok with this, while would it be confusing for review?

Patch
diff mbox series

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8cd06729169f..e2324df1b261 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1042,7 +1042,7 @@  static inline const char *__check_page(struct page *page)
 	return bad_reason;
 }
 
-static void free_pages_check_bad(struct page *page)
+static void check_free_page_bad(struct page *page)
 {
 	const char *bad_reason = NULL;
 	unsigned long bad_flags = 0;
@@ -1061,7 +1061,7 @@  static inline int free_pages_check(struct page *page)
 		return 0;
 
 	/* Something has gone sideways, find it */
-	free_pages_check_bad(page);
+	check_free_page_bad(page);
 	return 1;
 }