linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Russell King <linux@armlinux.org.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: kprobes: fix gcc-7 build warning
Date: Wed, 24 Jan 2018 22:04:06 +0100	[thread overview]
Message-ID: <20180124210421.104618-1-arnd@arndb.de> (raw)

Recent versions of binutils always warn about test-arm.s:

arch/arm/probes/kprobes/test-arm.s:18262: Warning: using r15 results in unpredictable behaviour
arch/arm/probes/kprobes/test-arm.s:18337: Warning: using r15 results in unpredictable behaviour

We could work around this using the __inst_arm() macro for passing
the two instruction as a hexadecimal literal number, but as Ard
pointed out, there is no reason to leave the warnings enabled for
this file in general, we intentionally test for an instruction that
is not recommended to be used.

For consistency, this turns off the warning in both the ARM and Thumb2
versions of this file.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/probes/kprobes/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/probes/kprobes/Makefile b/arch/arm/probes/kprobes/Makefile
index 14db56f49f0a..6432578fc74b 100644
--- a/arch/arm/probes/kprobes/Makefile
+++ b/arch/arm/probes/kprobes/Makefile
@@ -11,3 +11,7 @@ obj-$(CONFIG_KPROBES)		+= actions-arm.o checkers-arm.o
 obj-$(CONFIG_OPTPROBES)		+= opt-arm.o
 test-kprobes-objs		+= test-arm.o
 endif
+
+# don't warn about intentionally bogus instructions
+CFLAGS_test-arm.o		+= -Wa,--no-warn
+CFLAGS_test-thumb.o		+= -Wa,--no-warn
-- 
2.9.0

                 reply	other threads:[~2018-01-24 21:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180124210421.104618-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ard.biesheuvel@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mhiramat@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).