All of lore.kernel.org
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Borislav Petkov <bp@alien8.de>, Babu Moger <babu.moger@amd.com>
Cc: kernel test robot <lkp@intel.com>, <llvm@lists.linux.dev>,
	<oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<x86@kernel.org>
Subject: Re: [PATCH] x86/resctrl: Fix a silly -Wunused-but-set-variable warning
Date: Tue, 24 Jan 2023 10:30:39 -0800	[thread overview]
Message-ID: <471c5631-f5b7-84aa-14a9-d587108c7cdd@intel.com> (raw)
In-Reply-To: <Y9AftBkWXcFflHbm@zn.tnic>

Hi Boris,

On 1/24/2023 10:13 AM, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.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@intel.com>
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
> Link: https://lore.kernel.org/r/202301242015.kbzkVteJ-lkp@intel.com
> ---

Thank you very much.

Acked-by: Reinette Chatre <reinette.chatre@intel.com>

Reinette

  reply	other threads:[~2023-01-24 18:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 12:37 [tip:x86/cache 9/13] arch/x86/kernel/cpu/resctrl/rdtgroup.c:1456:6: warning: variable 'h' set but not used kernel test robot
2023-01-24 13:05 ` Borislav Petkov
2023-01-24 18:13   ` [PATCH] x86/resctrl: Fix a silly -Wunused-but-set-variable warning Borislav Petkov
2023-01-24 18:30     ` Reinette Chatre [this message]
2023-01-24 18:44     ` Moger, Babu
2023-02-09  3:06   ` [tip:x86/cache 9/13] arch/x86/kernel/cpu/resctrl/rdtgroup.c:1456:6: warning: variable 'h' set but not used Philip Li
2023-02-09  9:53     ` Borislav Petkov
2023-02-10  3:15       ` Philip Li
2023-02-10 21:49         ` Borislav Petkov
2023-01-26 10:34 ` [tip: x86/cache] x86/resctrl: Fix a silly -Wunused-but-set-variable warning tip-bot2 for Borislav Petkov (AMD)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=471c5631-f5b7-84aa-14a9-d587108c7cdd@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=babu.moger@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.