Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751386AbdL0AfP (ORCPT ); Tue, 26 Dec 2017 19:35:15 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:41377 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbdL0AfN (ORCPT ); Tue, 26 Dec 2017 19:35:13 -0500 X-Google-Smtp-Source: ACJfBovAHpMCAqnSn54YXhk6deyh7WEax8T5oID0wt8hm/rGaGHgrViKvhhUHtzkykqhD/LGDSBRzTmTW7FeElfXAF4= MIME-Version: 1.0 In-Reply-To: References: From: Nick Desaulniers Date: Tue, 26 Dec 2017 19:35:12 -0500 Message-ID: Subject: Re: [PATCH] objtool: Fix clang enum conversion warning To: Josh Poimboeuf Cc: Ingo Molnar , Linux Kernel Mailing List , Lukas Bulwahn , Jiri Slaby Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1675 Lines: 44 I sent a similar one recently: https://patchwork.kernel.org/patch/10131815/ (maybe Josh is just forwarding me an earlier fix?) Reviewed-by: Nick Desaulniers On Tue, Dec 26, 2017 at 4:27 PM, Josh Poimboeuf wrote: > From: Lukas Bulwahn > > 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. > > Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0") > Signed-off-by: Lukas Bulwahn > Signed-off-by: Josh Poimboeuf > --- > 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 8acfc47af70e..540a209b78ab 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; > -- > 2.13.6 >