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

2021-04-07 Thread Nick Desaulniers
On Wed, Apr 7, 2021 at 12:07 PM Borislav Petkov wrote: > > On Wed, Apr 07, 2021 at 09:03:28PM +0200, Borislav Petkov wrote: > > On Wed, Apr 07, 2021 at 10:41:26AM -0700, Nick Desaulniers wrote: > > > You do have clang-tidy installed right? `which clang-tidy`? > > Btw, for user convenience, that

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

2021-04-07 Thread Borislav Petkov
On Wed, Apr 07, 2021 at 09:03:28PM +0200, Borislav Petkov wrote: > On Wed, Apr 07, 2021 at 10:41:26AM -0700, Nick Desaulniers wrote: > > You do have clang-tidy installed right? `which clang-tidy`? Btw, for user convenience, that "clang-analyzer" Makefile target could check for the presence of

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

2021-04-07 Thread Borislav Petkov
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

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

2021-04-07 Thread Nick Desaulniers
On Wed, Apr 7, 2021 at 5:02 AM Borislav Petkov wrote: > > On Wed, Mar 31, 2021 at 04:00:24PM +0800, Yang Li wrote: > > make clang-analyzer on x86_64 defconfig caught my attention with: > > I can't trigger this here using: > > make CC=clang-11 -j16 clang-analyzer > > I get all kinds of missing

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

2021-04-07 Thread Borislav Petkov
On Wed, Mar 31, 2021 at 04:00:24PM +0800, Yang Li wrote: > make clang-analyzer on x86_64 defconfig caught my attention with: I can't trigger this here using: make CC=clang-11 -j16 clang-analyzer I get all kinds of missing python scripts: multiprocessing.pool.RemoteTraceback: """ Traceback

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

2021-03-31 Thread Nick Desaulniers
On Wed, Mar 31, 2021 at 1:00 AM Yang Li wrote: > > make clang-analyzer on x86_64 defconfig caught my attention with: > > 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

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

2021-03-31 Thread Yang Li
make clang-analyzer on x86_64 defconfig caught my attention with: 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); ^ So, simply