From: Borislav Petkov <bp@alien8.de>
To: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@suse.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Chao Fan <fanc.fnst@cn.fujitsu.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v2] x86/boot/KASLR: Fix unused variable warning
Date: Thu, 9 Jan 2020 19:40:55 +0100 [thread overview]
Message-ID: <20200109184055.GI5603@zn.tnic> (raw)
In-Reply-To: <20200103033929.4956-1-zhenzhong.duan@gmail.com>
On Fri, Jan 03, 2020 at 11:39:29AM +0800, Zhenzhong Duan wrote:
> Local variable 'i' is referenced only when CONFIG_MEMORY_HOTREMOVE and
> CONFIG_ACPI are defined, but definition of variable 'i' is out of guard.
> If any of the two macros is undefined, below warning triggers during
> build, fix it by moving 'i' in the guard.
>
> arch/x86/boot/compressed/kaslr.c:698:6: warning: unused variable ‘i’ [-Wunused-variable]
How do you trigger this?
I have:
$ grep -E "(CONFIG_MEMORY_HOTREMOVE|CONFIG_ACPI)" .config
# CONFIG_ACPI is not set
but no warning. Neither with gcc 8 nor with gcc 9.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2020-01-09 18:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 3:39 [PATCH v2] x86/boot/KASLR: Fix unused variable warning Zhenzhong Duan
2020-01-09 18:40 ` Borislav Petkov [this message]
2020-01-09 20:46 ` Arvind Sankar
2020-01-09 20:50 ` Borislav Petkov
2020-01-10 2:09 ` Zhenzhong Duan
2020-01-10 8:27 ` Borislav Petkov
2020-01-10 8:36 ` Zhenzhong Duan
2020-01-10 9:01 ` Borislav Petkov
2020-01-10 2:27 ` Zhenzhong Duan
2020-01-10 9:00 ` Borislav Petkov
2020-01-13 2:43 ` Zhenzhong Duan
2020-01-24 11:09 ` Borislav Petkov
2020-01-09 21:00 ` Thomas Gleixner
2020-01-10 8:46 ` Zhenzhong Duan
2020-01-10 13:13 ` Thomas Gleixner
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=20200109184055.GI5603@zn.tnic \
--to=bp@alien8.de \
--cc=bp@suse.de \
--cc=dave.hansen@linux.intel.com \
--cc=fanc.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zhenzhong.duan@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).