mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-12 16:08:13 +00:00
HV:treewide:string assigned to const object
In the hypervisor, some strings are assigned to non const object, this violates MISRA C:2012. Update the type of the object as const type since it always points to string. Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
static struct uart *sio_ports[SERIAL_MAX_DEVS];
|
||||
static uint8_t sio_initialized[SERIAL_MAX_DEVS];
|
||||
|
||||
static struct uart *get_uart_by_id(char *uart_id, uint32_t *index)
|
||||
static struct uart *get_uart_by_id(const char *uart_id, uint32_t *index)
|
||||
{
|
||||
/* Initialize the index to the start of array. */
|
||||
*index = 0U;
|
||||
@@ -78,7 +78,7 @@ int serial_init(void)
|
||||
return status;
|
||||
}
|
||||
|
||||
uint32_t serial_open(char *uart_id)
|
||||
uint32_t serial_open(const char *uart_id)
|
||||
{
|
||||
int status = SERIAL_DEV_NOT_FOUND;
|
||||
struct uart *uart;
|
||||
|
Reference in New Issue
Block a user