[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <471c5631-f5b7-84aa-14a9-d587108c7cdd@intel.com>
Date: Tue, 24 Jan 2023 10:30:39 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: Borislav Petkov <bp@...en8.de>, Babu Moger <babu.moger@....com>
CC: kernel test robot <lkp@...el.com>, <llvm@...ts.linux.dev>,
<oe-kbuild-all@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
<x86@...nel.org>
Subject: Re: [PATCH] x86/resctrl: Fix a silly -Wunused-but-set-variable
warning
Hi Boris,
On 1/24/2023 10:13 AM, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@...en8.de>
>
> clang correctly complains
>
> arch/x86/kernel/cpu/resctrl/rdtgroup.c:1456:6: warning: variable \
> 'h' set but not used [-Wunused-but-set-variable]
> u32 h;
> ^
>
> but it can't know whether this use is innocuous or really a problem.
> There's a reason why those warning switches are behind a W=1 and not
> enabled by default - yes, one needs to do:
>
> make W=1 CC=clang HOSTCC=clang arch/x86/kernel/cpu/resctrl/
>
> with clang 14 in order to trigger it.
>
> I would normally not take a silly fix like that but this one is simple
> and doesn't make the code uglier so...
>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
> Link: https://lore.kernel.org/r/202301242015.kbzkVteJ-lkp@intel.com
> ---
Thank you very much.
Acked-by: Reinette Chatre <reinette.chatre@...el.com>
Reinette
Powered by blists - more mailing lists