mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
hv:fix MISRA-C return value violation
1) Change these 5 APIs to void type: vcpu_inject_pf uart16550_calc_baud_div uart16550_set_baud_rate console_init ptdev_activate_entry No need to return 'entry' for ptdev_activate_entry since the input parameter is 'entry'. 2) no need to check return value for the caller such as sbuf_put/console_putc/serial_puts/serial_get_rx_data Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
@@ -12,12 +12,9 @@ extern struct timer console_timer;
|
||||
|
||||
/** Initializes the console module.
|
||||
*
|
||||
* @param cdev A pointer to the character device to use for the console.
|
||||
*
|
||||
* @return '0' on success. Any other value indicates an error.
|
||||
*/
|
||||
|
||||
int console_init(void);
|
||||
void console_init(void);
|
||||
|
||||
/** Writes a NUL terminated string to the console.
|
||||
*
|
||||
@@ -76,9 +73,8 @@ static inline void resume_console(void)
|
||||
}
|
||||
|
||||
#else
|
||||
static inline int console_init(void)
|
||||
static inline void console_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int console_puts(__unused const char *str)
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ _trace_put(uint16_t cpu_id, uint32_t evid,
|
||||
entry->id = evid;
|
||||
entry->n_data = (uint8_t)n_data;
|
||||
entry->cpu = (uint8_t)cpu_id;
|
||||
sbuf_put(sbuf, (uint8_t *)entry);
|
||||
(void)sbuf_put(sbuf, (uint8_t *)entry);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
Reference in New Issue
Block a user