* [PATCH -next] mm/filemap: avoid type conversion
@ 2024-01-08 4:48 Hongbo Li
2024-01-08 5:01 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Hongbo Li @ 2024-01-08 4:48 UTC (permalink / raw)
To: patchwork, willy, akpm; +Cc: linux-fsdevel, linux-mm, ruanjinjie, lihongbo22
The return type of function folio_test_hugetlb is bool type, there is no
need to assign it to an integer type.
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index 750e779c23db..0d7e20edf46f 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -843,7 +843,7 @@ noinline int __filemap_add_folio(struct address_space *mapping,
struct folio *folio, pgoff_t index, gfp_t gfp, void **shadowp)
{
XA_STATE(xas, &mapping->i_pages, index);
- int huge = folio_test_hugetlb(folio);
+ bool huge = folio_test_hugetlb(folio);
bool charged = false;
long nr = 1;
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] mm/filemap: avoid type conversion
2024-01-08 4:48 [PATCH -next] mm/filemap: avoid type conversion Hongbo Li
@ 2024-01-08 5:01 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2024-01-08 5:01 UTC (permalink / raw)
To: Hongbo Li; +Cc: patchwork, akpm, linux-fsdevel, linux-mm, ruanjinjie
On Mon, Jan 08, 2024 at 12:48:15PM +0800, Hongbo Li wrote:
> The return type of function folio_test_hugetlb is bool type, there is no
> need to assign it to an integer type.
>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-08 5:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-08 4:48 [PATCH -next] mm/filemap: avoid type conversion Hongbo Li
2024-01-08 5:01 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox