lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Mar 2021 12:24:15 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Xu Yihang <xuyihang@...wei.com>
Cc:     kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
        wei.liu@...nel.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, x86@...nel.org, hpa@...or.com,
        linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] x86: Fix unused variable 'hi'


* Xu Yihang <xuyihang@...wei.com> wrote:

> Fixes the following W=1 kernel build warning(s):
> arch/x86/hyperv/hv_apic.c:58:15: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable]
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Xu Yihang <xuyihang@...wei.com>
> ---
>  arch/x86/hyperv/hv_apic.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c
> index 284e73661a18..c0b0a5774f31 100644
> --- a/arch/x86/hyperv/hv_apic.c
> +++ b/arch/x86/hyperv/hv_apic.c
> @@ -55,7 +55,8 @@ static void hv_apic_icr_write(u32 low, u32 id)
>  
>  static u32 hv_apic_read(u32 reg)
>  {
> -	u32 reg_val, hi;
> +	u32 hi __maybe_unused;
> +	u32 reg_val;
>  
>  	switch (reg) {
>  	case APIC_EOI:

Why and under what config does this function trigger the warning?

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ