LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nick Desaulniers <nick.desaulniers@gmail.com>
To: ricardo.neri-calderon@linux.intel.com
Cc: bp@suse.de, Thomas Gleixner <tglx@linutronix.de>,
	mst@redhat.com, dave.hansen@linux.intel.com,
	ricardo.neri@intel.com, adrian.hunter@intel.com,
	paul.gortmaker@windriver.com, ray.huang@amd.com,
	qiaowei.ren@intel.com, shuah@kernel.org,
	Kees Cook <keescook@chromium.org>,
	corbet@lwn.net, jslaby@suse.cz, dvyukov@google.com,
	ravi.v.shankar@intel.com, cmetcalf@mellanox.com,
	brgerst@gmail.com, acme@redhat.com, luto@kernel.org,
	colin.king@canonical.com, slaoub@gmail.com,
	adam.buchbinder@gmail.com, vbabka@suse.cz,
	Lorenzo Stoakes <lstoakes@gmail.com>,
	mhiramat@kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	akpm@linux-foundation.org, thgarnie@google.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: constant conversion warning in umip
Date: Wed, 22 Nov 2017 23:32:52 -0800	[thread overview]
Message-ID: <CAH7mPviCKivZLkut6DcKz3hvKkMkrFyaenPi0aCbGJ+-97fO0Q@mail.gmail.com> (raw)

Pulling down ToT, I'm seeing the following warning when building with clang:

  CC      arch/x86/lib/insn.o
arch/x86/lib/insn-eval.c:780:10: error: implicit conversion from 'int'
to 'char' changes value from 132 to -124
[-Werror,-Wconstant-conversion]
                return INSN_CODE_SEG_PARAMS(4, 8);
                ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/insn-eval.h:16:57: note: expanded from macro
'INSN_CODE_SEG_PARAMS'
#define INSN_CODE_SEG_PARAMS(oper_sz, addr_sz) (oper_sz | (addr_sz << 4))
                                                ~~~~~~~~^~~~~~~~~~~~~~~~

seems to be coming from commit 4efea85fb56fa "x86/insn-eval: Add
function to get default params of code segment".  Should this be an
unsigned char (as well as seg_defs in arch/x86/kernel/umip.c?  That
might be an issue for returning -EINVAL, maybe an in/out parameter
would be better?

                 reply	other threads:[~2017-11-23  7:32 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=CAH7mPviCKivZLkut6DcKz3hvKkMkrFyaenPi0aCbGJ+-97fO0Q@mail.gmail.com \
    --to=nick.desaulniers@gmail.com \
    --cc=acme@redhat.com \
    --cc=adam.buchbinder@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=cmetcalf@mellanox.com \
    --cc=colin.king@canonical.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=dvyukov@google.com \
    --cc=jslaby@suse.cz \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lstoakes@gmail.com \
    --cc=luto@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mst@redhat.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=pbonzini@redhat.com \
    --cc=qiaowei.ren@intel.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=ray.huang@amd.com \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=ricardo.neri@intel.com \
    --cc=shuah@kernel.org \
    --cc=slaoub@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=thgarnie@google.com \
    --cc=vbabka@suse.cz \
    /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).