hv: vuart: fix the data type violations

- Fix the data type violations based on MISRA-C requirements
- Add '-fsigned-char' in Makefile to let the compiler treats 'char' be
   signed, like 'signed char'.
  Otherwise, the static checker treats 'char', 'signed char' and 'unsigned
   char' as three different types.
- Fix some minor coding style issues, such as TAB issues, line over 80
   characters issues and comments style

v1 -> v2:
 * fix the violation regarding to 'fifo_getchar'

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Shiqing Gao
2018-08-16 14:57:20 +08:00
committed by lijinxia
parent d82a86e648
commit 40745d90c5
4 changed files with 68 additions and 64 deletions

View File

@@ -32,10 +32,10 @@
struct fifo {
char *buf;
int rindex; /* index to read from */
int windex; /* index to write to */
int num; /* number of characters in the fifo */
int size; /* size of the fifo */
uint32_t rindex; /* index to read from */
uint32_t windex; /* index to write to */
uint32_t num; /* number of characters in the fifo */
uint32_t size; /* size of the fifo */
};
struct vuart {
@@ -52,7 +52,7 @@ struct vuart {
struct fifo rxfifo;
struct fifo txfifo;
int base;
uint16_t base;
bool thre_int_pending; /* THRE interrupt pending */
bool active;