All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Lukas Bulwahn <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org,
	der.herr@hofr.at, peterz@infradead.org, jslaby@suse.cz,
	nick.desaulniers@gmail.com, lukas.bulwahn@gmail.com,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	jpoimboe@redhat.com
Subject: [tip:core/urgent] objtool: Fix Clang enum conversion warning
Date: Thu, 28 Dec 2017 07:37:25 -0800	[thread overview]
Message-ID: <tip-e7e83dd3ff1dd2f9e60213f6eedc7e5b08192062@git.kernel.org> (raw)
In-Reply-To: <b4156c5738bae781c392e7a3691aed4514ebbdf2.1514323568.git.jpoimboe@redhat.com>

Commit-ID:  e7e83dd3ff1dd2f9e60213f6eedc7e5b08192062
Gitweb:     https://git.kernel.org/tip/e7e83dd3ff1dd2f9e60213f6eedc7e5b08192062
Author:     Lukas Bulwahn <lukas.bulwahn@gmail.com>
AuthorDate: Tue, 26 Dec 2017 15:27:20 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 28 Dec 2017 13:11:13 +0100

objtool: Fix Clang enum conversion warning

Fix the following Clang enum conversion warning:

  arch/x86/decode.c:141:20: error: implicit conversion from enumeration
  type 'enum op_src_type' to different enumeration
  type 'enum op_dest_type' [-Werror,-Wenum-conversion]

    op->dest.type = OP_SRC_REG;
		  ~ ^~~~~~~~~~

It just happened to work before because OP_SRC_REG and OP_DEST_REG have
the same value.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Nicholas Mc Guire <der.herr@hofr.at>
Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0")
Link: http://lkml.kernel.org/r/b4156c5738bae781c392e7a3691aed4514ebbdf2.1514323568.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/objtool/arch/x86/decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
index 8acfc47..540a209 100644
--- a/tools/objtool/arch/x86/decode.c
+++ b/tools/objtool/arch/x86/decode.c
@@ -138,7 +138,7 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
 			*type = INSN_STACK;
 			op->src.type = OP_SRC_ADD;
 			op->src.reg = op_to_cfi_reg[modrm_reg][rex_r];
-			op->dest.type = OP_SRC_REG;
+			op->dest.type = OP_DEST_REG;
 			op->dest.reg = CFI_SP;
 		}
 		break;

      parent reply	other threads:[~2017-12-28 15:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26 21:27 [PATCH] objtool: Fix clang enum conversion warning Josh Poimboeuf
2017-12-27  0:35 ` Nick Desaulniers
2017-12-27 12:34   ` Lukas Bulwahn
2017-12-27 17:38     ` Josh Poimboeuf
2017-12-28  3:42       ` Nick Desaulniers
2017-12-28  5:12         ` Josh Poimboeuf
2017-12-28 12:09           ` Ingo Molnar
2017-12-28  8:18       ` Lukas Bulwahn
2017-12-28 15:37 ` tip-bot for Lukas Bulwahn [this message]

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=tip-e7e83dd3ff1dd2f9e60213f6eedc7e5b08192062@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=der.herr@hofr.at \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mingo@kernel.org \
    --cc=nick.desaulniers@gmail.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.