LKML Archive on
help / color / mirror / Atom feed
* constant conversion warning in umip
@ 2017-11-23  7:32 Nick Desaulniers
  0 siblings, 0 replies; only message in thread
From: Nick Desaulniers @ 2017-11-23  7:32 UTC (permalink / raw)
  To: ricardo.neri-calderon
  Cc: bp, Thomas Gleixner, mst, dave.hansen, ricardo.neri,
	adrian.hunter, paul.gortmaker, ray.huang,, shuah,
	Kees Cook, corbet, jslaby, dvyukov, ravi.v.shankar, cmetcalf,
	brgerst, acme, luto, colin.king, slaoub, adam.buchbinder, vbabka,
	Lorenzo Stoakes, mhiramat, Paolo Bonzini, akpm, thgarnie,
	Linux Kernel Mailing List

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
                return INSN_CODE_SEG_PARAMS(4, 8);
                ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/insn-eval.h:16:57: note: expanded from macro
#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?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-23  7:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23  7:32 constant conversion warning in umip Nick Desaulniers

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).