Skip to content

-Wuninitialized-const-pointer in arch/arm64/kvm/sys_regs.c #2113

@JustinStitt

Description

@JustinStitt

The cli only reports this failure for android14-6.1 (clang-22) which seems correct as this code area was reworked by kernel Commit 7af0c25 ("KVM: arm64: Normalize cache configuration").

$ make LLVM=1 ARCH=arm64 -j128 arch/arm64/kvm/sys_regs.o

../arch/arm64/kvm/sys_regs.c:2978:23: warning: variable 'clidr' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
 2978 |         get_clidr_el1(NULL, &clidr); /* Ugly... */
      |                              ^~~~~
1 warning generated.

Patch: https://lore.kernel.org/lkml/20250724-b4-clidr-unint-const-ptr-v1-1-67c4d620b6b6@google.com

I've sent this only for v6.1.y aimed at stable as this patch cannot be upstreamed (this code has been reworked).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions