Messages in this thread Patch in this message | | | From | cgel.zte@gmail ... | Subject | [PATCH] mm: fix boolreturn.cocci warning | Date | Fri, 26 Nov 2021 07:33:27 +0000 |
| |
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Return statements in functions returning bool should use true/false instead of 1/0.
Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> --- include/linux/page-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 52ec4b5e5615..6765eba52dea 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -383,7 +383,7 @@ static __always_inline int TestClearPage##uname(struct page *page) \ TESTCLEARFLAG(uname, lname, policy) #define TESTPAGEFLAG_FALSE(uname, lname) \ -static inline bool folio_test_##lname(const struct folio *folio) { return 0; } \ +static inline bool folio_test_##lname(const struct folio *folio) { return false; } \ static inline int Page##uname(const struct page *page) { return 0; } #define SETPAGEFLAG_NOOP(uname, lname) \ -- 2.25.1
| |