hv: use int32_t replace int

Since it's typedef in "include/lib/types.h"

Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2018-12-08 00:30:49 +08:00
committed by wenlingz
parent e8f3a2d42c
commit e3fc6c3c79
91 changed files with 472 additions and 471 deletions

View File

@@ -103,11 +103,11 @@ struct acpi_madt_local_apic {
static void *global_rsdp;
static struct acpi_table_rsdp*
biosacpi_search_rsdp(char *base, int length)
biosacpi_search_rsdp(char *base, int32_t length)
{
struct acpi_table_rsdp *rsdp;
uint8_t *cp, sum;
int ofs, idx;
int32_t ofs, idx;
/* search on 16-byte boundaries */
for (ofs = 0; ofs < length; ofs += 16) {

View File

@@ -55,7 +55,7 @@ struct acpi_dmar_hardware_unit {
};
struct find_iter_args {
int i;
int32_t i;
struct acpi_dmar_hardware_unit *res;
};
@@ -72,10 +72,10 @@ struct acpi_dmar_device_scope {
uint8_t bus;
};
typedef int (*dmar_iter_t)(struct acpi_dmar_header*, void*);
typedef int32_t (*dmar_iter_t)(struct acpi_dmar_header*, void*);
static struct dmar_info dmar_info_parsed;
static int dmar_unit_cnt;
static int32_t dmar_unit_cnt;
static void
dmar_iterate_tbl(dmar_iter_t iter, void *arg)
@@ -105,7 +105,7 @@ dmar_iterate_tbl(dmar_iter_t iter, void *arg)
}
}
static int
static int32_t
drhd_count_iter(struct acpi_dmar_header *dmar_header, __unused void *arg)
{
if (dmar_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT)
@@ -113,7 +113,7 @@ drhd_count_iter(struct acpi_dmar_header *dmar_header, __unused void *arg)
return 1;
}
static int
static int32_t
drhd_find_iter(struct acpi_dmar_header *dmar_header, void *arg)
{
struct find_iter_args *args;
@@ -131,7 +131,7 @@ drhd_find_iter(struct acpi_dmar_header *dmar_header, void *arg)
}
static struct acpi_dmar_hardware_unit *
drhd_find_by_index(int idx)
drhd_find_by_index(int32_t idx)
{
struct find_iter_args args;
@@ -154,10 +154,10 @@ static uint8_t get_secondary_bus(uint8_t bus, uint8_t dev, uint8_t func)
}
static uint16_t
dmar_path_bdf(int path_len, int busno,
dmar_path_bdf(int32_t path_len, int32_t busno,
const struct acpi_dmar_pci_path *path)
{
int i;
int32_t i;
uint8_t bus;
uint8_t dev;
uint8_t fun;
@@ -177,16 +177,16 @@ dmar_path_bdf(int path_len, int busno,
}
static int
static int32_t
handle_dmar_devscope(struct dmar_dev_scope *dev_scope,
void *addr, int remaining)
void *addr, int32_t remaining)
{
int path_len;
int32_t path_len;
uint16_t bdf;
struct acpi_dmar_pci_path *path;
struct acpi_dmar_device_scope *apci_devscope = addr;
if (remaining < (int)sizeof(struct acpi_dmar_device_scope))
if (remaining < (int32_t)sizeof(struct acpi_dmar_device_scope))
return -1;
if (remaining < apci_devscope->length)
@@ -226,13 +226,13 @@ get_drhd_dev_scope_cnt(struct acpi_dmar_hardware_unit *drhd)
return count;
}
static int
static int32_t
handle_one_drhd(struct acpi_dmar_hardware_unit *acpi_drhd,
struct dmar_drhd *drhd)
{
struct dmar_dev_scope *dev_scope;
struct acpi_dmar_device_scope *ads;
int remaining, consumed;
int32_t remaining, consumed;
char *cp;
uint32_t dev_count;
@@ -291,9 +291,9 @@ handle_one_drhd(struct acpi_dmar_hardware_unit *acpi_drhd,
return 0;
}
int parse_dmar_table(void)
int32_t parse_dmar_table(void)
{
int i;
int32_t i;
struct acpi_dmar_hardware_unit *acpi_drhd;
/* find out how many dmar units */

View File

@@ -17,7 +17,7 @@
#define MAX_BOOT_PARAMS_LEN 64U
#ifdef CONFIG_PARTITION_MODE
int init_vm_boot_info(struct acrn_vm *vm)
int32_t init_vm_boot_info(struct acrn_vm *vm)
{
struct multiboot_module *mods = NULL;
struct multiboot_info *mbi = NULL;
@@ -104,7 +104,7 @@ static void parse_other_modules(struct acrn_vm *vm,
void *load_addr = gpa2hva(vm,
(uint64_t)vm->sw.linux_info.bootargs_load_addr);
uint32_t args_size = vm->sw.linux_info.bootargs_size;
static int copy_once = 1;
static int32_t copy_once = 1;
start = end + 1; /*it is fw name for boot args */
snprintf(dyn_bootargs, 100U, " %s=0x%x@0x%x ",
@@ -164,7 +164,7 @@ static void *get_kernel_load_addr(void *kernel_src_addr)
* @pre vm != NULL
* @pre is_vm0(vm) == true
*/
int init_vm_boot_info(struct acrn_vm *vm)
int32_t init_vm_boot_info(struct acrn_vm *vm)
{
struct multiboot_module *mods = NULL;
struct multiboot_info *mbi = NULL;