From: Zhenzhong Duan <zhenzhong.duan@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, zhenzhong.duan@gmail.com,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH 1/2] x86/boot: Add -Wunused to KBUILD_CFLAGS
Date: Tue, 3 Mar 2020 14:52:09 +0800 [thread overview]
Message-ID: <20200303065210.1279-2-zhenzhong.duan@gmail.com> (raw)
In-Reply-To: <20200303065210.1279-1-zhenzhong.duan@gmail.com>
Compile warning option in arch/x86/boot/compressed is different from
other part of the kernel for some history reason. But "-Wunused" is
safe to be added to point out unused variable issue.
Link: https://lore.kernel.org/patchwork/patch/1175001/#1379873
Suggested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/boot/compressed/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 26050ae0b27e..cb9743ec453a 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -37,7 +37,7 @@ KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
-KBUILD_CFLAGS += -Wno-pointer-sign
+KBUILD_CFLAGS += -Wno-pointer-sign -Wunused
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
--
2.17.1
next prev parent reply other threads:[~2020-03-03 6:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 6:52 [PATCH 0/2] Add -Wunused to x86 boot module and fix build warning Zhenzhong Duan
2020-03-03 6:52 ` Zhenzhong Duan [this message]
2020-03-03 6:52 ` [PATCH 2/2] x86/boot/KASLR: Fix unused variable warning Zhenzhong Duan
2020-03-03 22:56 ` Dave Hansen
2020-03-05 4:03 ` Zhenzhong Duan
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=20200303065210.1279-2-zhenzhong.duan@gmail.com \
--to=zhenzhong.duan@gmail.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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 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).