acrn-hypervisor/hypervisor/include
Shiqing Gao 3df3c9f6a1 hv: vuart: fix 'Shifting value too far'
MISRA-C requires that shift operation cannot exceed the word length.

What this patch does:
- Fix the bug in 'vuart_init'
  The register 'dll' and 'dlh' should be uint8_t rather than char.
  'dll' is the lower 8-bit of divisor.
  'dlh' is the higher 8-bit of divisor.
  So, the shift value should be 8U rather than 16U.
- Fix other data type issues regarding to the registers in 'struct
  vuart'
  The registers should be unsigned variables.

v1 -> v2:
 * Use a local variable 'uint8_t value_u8 = (uint8_t)value' to avoid
   mutiple times type conversion
 * Use '(uint8_t)divisor' rather than '(uint8_t)(divisor & 0xFFU)' to
   get the lower 8 bit of 'divisor'
   Direct type conversion is safe and simple per Xiangyang's suggestion.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2018-08-16 09:01:53 +08:00
..
arch/x86 hv:fix return value violations for vpic/vioapic 2018-08-16 09:01:08 +08:00
common hv: pirq: rename common irq APIs 2018-08-15 10:40:43 +08:00
debug hv: vuart: fix 'Shifting value too far' 2018-08-16 09:01:53 +08:00
dm/vpci HV: Adding hostbridge vdev device support for partition hypervisor 2018-08-10 10:09:00 +08:00
lib hv: treewide: fix multiple MISRAC violations 2018-08-15 11:21:09 +08:00
public HV: io: drop REQ_STATE_FAILED 2018-08-15 12:04:12 +08:00
hv_debug.h HV: Merge hypervisor debug header files 2018-08-14 09:54:48 +08:00
hv_lib.h license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
hypervisor.h hv: mmu: revisit mmu modify page table attributes 2018-07-19 11:11:32 +08:00