Re: [PATCH] x86/kernel: remove unneeded dead-store initialization

From: Borislav Petkov
Date: Wed Apr 07 2021 - 15:03:35 EST


On Wed, Apr 07, 2021 at 10:41:26AM -0700, Nick Desaulniers wrote:
> You do have clang-tidy installed right? `which clang-tidy`?

Yah, installed that and was able to repro:

arch/x86/kernel/cpu/cacheinfo.c:880:24: warning: Value stored to 'this_cpu_ci' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
arch/x86/kernel/cpu/cacheinfo.c:880:24: note: Value stored to 'this_cpu_ci' during its initialization is never read

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette