[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8ccabf86-c194-48c1-9fa3-c7515742d63c@linux.dev>
Date: Wed, 15 Oct 2025 17:37:22 +0800
From: Ye Liu <ye.liu@...ux.dev>
To: Dev Jain <dev.jain@....com>, Andrew Morton <akpm@...ux-foundation.org>
Cc: Ye Liu <liuye@...inos.cn>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools/mm: use <stdbool.h> in page_owner_sort.c
在 2025/10/15 17:08, Dev Jain 写道:
>
> On 15/10/25 2:28 pm, Ye Liu wrote:
>> From: Ye Liu <liuye@...inos.cn>
>>
>> Use standard <stdbool.h> instead of manually defining bool, true and false.
>>
>> Signed-off-by: Ye Liu <liuye@...inos.cn>
>> ---
>> tools/mm/page_owner_sort.c | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/mm/page_owner_sort.c b/tools/mm/page_owner_sort.c
>> index 880e36df0c11..cbd195d7b5da 100644
>> --- a/tools/mm/page_owner_sort.c
>> +++ b/tools/mm/page_owner_sort.c
>> @@ -13,6 +13,7 @@
>> #include <stdio.h>
>> #include <stdlib.h>
>> +#include <stdbool.h>
>> #include <sys/types.h>
>> #include <sys/stat.h>
>> #include <fcntl.h>
>> @@ -23,9 +24,9 @@
>> #include <linux/types.h>
>> #include <getopt.h>
>> -#define bool int
>> -#define true 1
>> -#define false 0
>> +//#define bool int
>> +//#define true 1
>> +//#define false 0
>> #define TASK_COMM_LEN 16
>
> You forgot to remove these :)
Oops, you're right — I’ll drop those lines and send a v2. :)
Thanks!>
>> struct block_list {
--
Thanks,
Ye Liu
Powered by blists - more mailing lists