hw/loongarch/virt: Checkpatch cleanup
PATCH 1/1 hw/loongarch/virt: Checkpatch cleanup
Code cleanup with directory hw/loongarch/, removing errors from command "scripts/checkpatch.pl hw/loongarch/*"
Signed-off-by Bibo Mao <[email protected]>
--- hw/loongarch/acpi-build.c | 3 ++- hw/loongarch/boot.c | 4 ++-- hw/loongarch/virt.c | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-)
hw/loongarch/acpi-build.c +2 -1
@@ -456,8 +456,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, MachineState *machine)acpi_table_begin (&table, table_data); dsdt =init_aml_allocator (); -for (i =0 ; i <VIRT_UART_COUNT ; i++) +for (i =0 ; i <VIRT_UART_COUNT ; i++) {build_uart_device_aml (dsdt, i); + }build_pci_device_aml (dsdt, lvms);build_la_ged_aml (dsdt, machine);build_flash_aml (dsdt, lvms);
hw/loongarch/boot.c +2 -2
@@ -223,7 +223,7 @@ static void reset_load_elf(void *opaque)cpu_reset (CPU (cpu));if (env->load_elf) { -if (cpu ==LOONGARCH_CPU (first_cpu)) { +if (cpu ==LOONGARCH_CPU (first_cpu)) { env->gpr[4 ] = env->boot_info->a0; env->gpr[5 ] = env->boot_info->a1; env->gpr[6 ] = env->boot_info->a2;
@@ -285,7 +285,7 @@ static void loongarch_direct_kernel_boot(struct loongarch_boot_info *info)if (info->kernel_filename) { kernel_addr =load_kernel_info (info); }else { -if (!qtest_enabled ()) { +if (!qtest_enabled ()) {warn_report ("No kernel provided, booting from flash drive." ); } }
hw/loongarch/virt.c +6 -4
@@ -331,8 +331,9 @@ static void fdt_add_uart_node(LoongArchVirtMachineState *lvms,qemu_fdt_setprop_string (ms->fdt, nodename,"compatible" ,"ns16550a" );qemu_fdt_setprop_cells (ms->fdt, nodename,"reg" ,0x0 , base,0x0 , size);qemu_fdt_setprop_cell (ms->fdt, nodename,"clock-frequency" ,100000000 ); -if (chosen) +if (chosen) {qemu_fdt_setprop_string (ms->fdt,"/chosen" ,"stdout-path" , nodename); + }qemu_fdt_setprop_cells (ms->fdt, nodename,"interrupts" , irq,0x4 );qemu_fdt_setprop_cell (ms->fdt, nodename,"interrupt-parent" , *pch_pic_phandle);
@@ -452,7 +453,7 @@ static void fdt_add_pcie_irq_map_node(const LoongArchVirtMachineState *lvms, {int pin, dev;uint32_t irq_map_stride =0 ; -uint32_t full_irq_map[GPEX_NUM_IRQS *GPEX_NUM_IRQS *10 ] = {}; +uint32_t full_irq_map[GPEX_NUM_IRQS *GPEX_NUM_IRQS *10 ] = {};uint32_t *irq_map = full_irq_map;const MachineState *ms =MACHINE (lvms);
@@ -815,7 +816,7 @@ static void virt_devices_init(DeviceState *pch_pic,* Create uart fdt node in reverse order so that they appear * in the finished device tree lowest address first */ -for (i =VIRT_UART_COUNT ; i -->0 ;) { +for (i =VIRT_UART_COUNT ; i-- >0 ;) {hwaddr base =VIRT_UART_BASE + i *VIRT_UART_SIZE ;int irq =VIRT_UART_IRQ + i -VIRT_GSI_BASE ; serial_mm_init(get_system_memory(), base, 0,
@@ -1176,8 +1177,9 @@ static void fw_cfg_add_memory(MachineState *ms) size = ram_size - numa_info[0 ].node_mem; } -if (size) +if (size) {memmap_add_entry (base, size,1 ); + } }static void virt_init (MachineState *machine)
base-commit: 2b7a80e07a29074530a0ebc8005a418ee07b1faf
Signature · 1 line
2.39.3
Quoted 9 lines · Bibo Mao
Code cleanup with directory hw/loongarch/, removing errors from command "
scripts/checkpatch.plhw/loongarch/*"Signed-off-by Bibo Mao <[email protected]>--- hw/loongarch/acpi-build.c | 3 ++- hw/loongarch/boot.c | 4 ++-- hw/loongarch/virt.c | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
(and queued via hw-misc)