HV:treewide:fix value outside range of underlying type

There are potential value outside range of underlying type
in some assignment expressions. This violates Rule 10.3 or
Rule 10.4 of MISRA C:2012.
BTW, all operations shall be conducted in exactly the same
arithmetic (underlying) type, otherwise, there is a
value outside range violation.

Update related assignment expressions.

V1-->V2:
	* Fix potential overflow in "pit_calibrate_tsc";
	* Move PTDEV_INVALID_PIN definition before
	  get_entry_info since this MACRO is only used by
	  debug function.

Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Xiangyang Wu
2018-08-06 09:00:43 +08:00
committed by lijinxia
parent c663267b03
commit 5aa1ad3bfc
5 changed files with 26 additions and 23 deletions

View File

@@ -76,7 +76,7 @@
#include <types.h>
#include <cpu.h>
#define TSS_AVAIL (9)
#define TSS_AVAIL (9U)
/*
* Definition of an 8 byte code segment descriptor.