HV: fix vuart.c "Parameter needs to add const"

ACRN Coding guidelines requires parameters need to add const prefix when the
parameter is not modified in its function or recursion function call.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi 2019-07-05 12:01:45 +08:00 committed by ACRN System Integration
parent e4d1c321ad
commit 564a60120a
2 changed files with 7 additions and 7 deletions

View File

@ -472,7 +472,7 @@ static bool vuart_register_io_handler(struct acrn_vm *vm, uint16_t port_base, ui
}
static void vuart_setup(struct acrn_vm *vm,
struct vuart_config *vu_config, uint16_t vuart_idx)
const struct vuart_config *vu_config, uint16_t vuart_idx)
{
uint32_t divisor;
struct acrn_vuart *vu = &vm->vuart[vuart_idx];
@ -500,7 +500,7 @@ static void vuart_setup(struct acrn_vm *vm,
}
}
static struct acrn_vuart *find_active_target_vuart(struct vuart_config *vu_config)
static struct acrn_vuart *find_active_target_vuart(const struct vuart_config *vu_config)
{
struct acrn_vm *target_vm = NULL;
struct acrn_vuart *target_vu = NULL, *ret_vu = NULL;
@ -523,7 +523,7 @@ static struct acrn_vuart *find_active_target_vuart(struct vuart_config *vu_confi
}
static void vuart_setup_connection(struct acrn_vm *vm,
struct vuart_config *vu_config, uint16_t vuart_idx)
const struct vuart_config *vu_config, uint16_t vuart_idx)
{
struct acrn_vuart *vu, *t_vu;
@ -545,7 +545,7 @@ static void vuart_deinit_connect(struct acrn_vuart *vu)
vu->target_vu = NULL;
}
bool is_vuart_intx(struct acrn_vm *vm, uint32_t intx_pin)
bool is_vuart_intx(const struct acrn_vm *vm, uint32_t intx_pin)
{
uint8_t i;
bool ret = false;
@ -558,7 +558,7 @@ bool is_vuart_intx(struct acrn_vm *vm, uint32_t intx_pin)
return ret;
}
void vuart_init(struct acrn_vm *vm, struct vuart_config *vu_config)
void vuart_init(struct acrn_vm *vm, const struct vuart_config *vu_config)
{
uint8_t i;

View File

@ -81,12 +81,12 @@ struct acrn_vuart {
spinlock_t lock; /* protects all softc elements */
};
void vuart_init(struct acrn_vm *vm, struct vuart_config *vu_config);
void vuart_init(struct acrn_vm *vm, const struct vuart_config *vu_config);
void vuart_deinit(struct acrn_vm *vm);
void vuart_putchar(struct acrn_vuart *vu, char ch);
char vuart_getchar(struct acrn_vuart *vu);
void vuart_toggle_intr(const struct acrn_vuart *vu);
bool is_vuart_intx(struct acrn_vm *vm, uint32_t intx_pin);
bool is_vuart_intx(const struct acrn_vm *vm, uint32_t intx_pin);
#endif /* VUART_H */