Re: [ammarfaizi2-block:akpm/mm/mm-unstable 146/162] include/linux/memremap.h:258:9: error: expression which evaluates to zero treated as a null pointer constant of type 'struct folio *'
From: Andrew Morton
Date: Sat Oct 22 2022 - 19:34:07 EST
On Sat, 22 Oct 2022 13:27:19 +0800 kernel test robot <lkp@xxxxxxxxx> wrote:
> In file included from include/linux/mm.h:31:
> >> include/linux/memremap.h:258:9: error: expression which evaluates to zero treated as a null pointer constant of type 'struct folio *' [-Werror,-Wnon-literal-null-conversion]
> return false;
Thanks. Doh.
--- a/include/linux/memremap.h~mm-memremap-introduce-pgmap_request_folio-using-pgmap-offsets-fix
+++ a/include/linux/memremap.h
@@ -255,7 +255,7 @@ static inline struct dev_pagemap *get_de
static inline struct folio *pgmap_request_folio(struct dev_pagemap *pgmap,
pgoff_t pgmap_offset, int order)
{
- return false;
+ return NULL;
}
static inline bool pgmap_pfn_valid(struct dev_pagemap *pgmap, unsigned long pfn)
_