Clang Build warning detected - 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]

0 views
Skip to first unread message

Naresh Kamboju

unread,
Oct 25, 2022, 12:19:38 AM10/25/22
to clang-built-linux, open list, lkft-...@lists.linaro.org, Nathan Chancellor, Andrew Morton
Following build warning / errors noticed while building x86_64 with clang
on Linux next-20221025 tag.

Reported-by: Linux Kernel Functional Testing <lk...@linaro.org>

## Build
* kernel: 6.1.0-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
* git branch: master
* git commit: 76cf65d1377f733af1e2a55233e3353ffa577f54
* git describe: next-20221024
* test details:
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20221024

## Test Regressions (compared to next-20221021)
* i386, build
- clang-12-lkftconfig
- clang-13-lkftconfig
- clang-14-lkftconfig
- clang-nightly-lkftconfig

* x86_64, build
- clang-12-lkftconfig
- clang-13-lkftconfig
- clang-14-lkftconfig
- clang-nightly-lkftconfig


make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build LLVM=1 LLVM_IAS=1
ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- HOSTCC=clang CC=clang
In file included from arch/x86/kernel/asm-offsets.c:13:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:20:
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;
^~~~~
1 error generated.
make[2]: *** [scripts/Makefile.build:118: arch/x86/kernel/asm-offsets.s] Error 1


--
Linaro LKFT
https://lkft.linaro.org

Nick Desaulniers

unread,
Oct 25, 2022, 12:33:55 PM10/25/22
to Naresh Kamboju, open list, lkft-...@lists.linaro.org, Nathan Chancellor, Andrew Morton, Ammar Faizi, clang-built-linux
On Mon, Oct 24, 2022 at 9:19 PM Naresh Kamboju
<naresh....@linaro.org> wrote:
>
> Following build warning / errors noticed while building x86_64 with clang
> on Linux next-20221025 tag.
>
> Reported-by: Linux Kernel Functional Testing <lk...@linaro.org>

Hi Naresh,
Thanks for the report. It looks like AKPM is already aware.
https://lore.kernel.org/llvm/20221022163356.f5e0...@linux-foundation.org/

Naresh, for future reports, can you use our newer mailing list
<ll...@lists.linux.dev> rather than our older one
(<clang-bu...@googlegroups.com>). I haven't actually closed the
old one, but the new one is syndicated on lore.
https://lore.kernel.org/llvm/
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-li...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CA%2BG9fYvGe%2BfHXw8RMeZuXB-rGVDjs81m9_RwDq73R%2BpnVpYjEw%40mail.gmail.com.



--
Thanks,
~Nick Desaulniers
Reply all
Reply to author
Forward
0 new messages