hv:Clear up printf related definition

In hypervisor, all the parameter and return value printf related are
unsigned int, this patch is used to fix the function definitions.

v1->v2:
  *Modify the return value of various functions, such as printf(),
   vprintf(), charout(), do_printf(), charmem, print_pow2(),
   print_decimal to void due to never used, no necessary to use,
   or has already returned by param.
  *Delete the impossible judgement of param->emit due to the type
   is unsigned.

Tracked-On: #861
Signed-off-by: Junjun Shan <junjun.shan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Junjun Shan
2018-09-17 17:42:03 +08:00
committed by Wang, Minxia
parent ed06b8a7ca
commit 7ce0e6a395
4 changed files with 60 additions and 124 deletions

View File

@@ -54,7 +54,7 @@ void asm_assert(int32_t line, const char *file, const char *txt);
* number if an error occurred.
*/
int printf(const char *fmt, ...);
void printf(const char *fmt, ...);
/** The well known vprintf() function.
*
@@ -66,7 +66,7 @@ int printf(const char *fmt, ...);
* number if an error occurred.
*/
int vprintf(const char *fmt, va_list args);
void vprintf(const char *fmt, va_list args);
#else /* HV_DEBUG */
@@ -85,14 +85,14 @@ static inline void print_logmsg_buffer(__unused uint16_t pcpu_id)
#define ASSERT(x, ...) do { } while (0)
static inline int printf(__unused const char *fmt, ...)
static inline void printf(__unused const char *fmt, ...)
{
return 0;
}
static inline int vprintf(__unused const char *fmt, __unused va_list args)
static inline void vprintf(__unused const char *fmt, __unused va_list args)
{
return 0;
}
#endif /* HV_DEBUG */