summaryrefslogtreecommitdiff
path: root/lib/intel_io.h
diff options
context:
space:
mode:
authorSimon Ser <simon.ser@intel.com>2019-03-21 12:26:56 +0200
committerPetri Latvala <petri.latvala@intel.com>2019-04-16 13:36:51 +0300
commitcc9a60c029432b5843724e4f2c57f9f815f7adbb (patch)
treeb0df782f7cfcc6548748ec14f9ad522c93829580 /lib/intel_io.h
parent504343f541a4680e9d6b591951a89eb885143a97 (diff)
lib/intel_reg: fix shift undefined behaviour
1<<31 (same as 2<<30) is undefined behaviour in C. When compiling with GCC and UBSan, it gives this error: ../tools/intel_reg_decode.c: In function ‘ivb_debug_port’: ../tools/intel_reg_decode.c:398:3: error: case label does not reduce to an integer constant case PORT_DBG_DRRS_HW_STATE_HIGH: ^~~~ This happens because 1<<31 isn't representable as a signed int. Instead, use an unsigned int. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/intel_io.h')
0 files changed, 0 insertions, 0 deletions