diff mbox series

[2/3] hw/sparc64/niagara: Use blk_name() instead of open-coding it

Message ID 20221208143939.2775453-3-armbru@redhat.com
State New
Headers show
Series block: Clean up includes | expand

Commit Message

Markus Armbruster Dec. 8, 2022, 2:39 p.m. UTC
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/sparc64/niagara.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 8, 2022, 2:54 p.m. UTC | #1
On 8/12/22 15:39, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   hw/sparc64/niagara.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index ab3c4ec346..6725cc61fd 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -23,7 +23,6 @@ 
  */
 
 #include "qemu/osdep.h"
-#include "block/block_int-common.h"
 #include "qemu/units.h"
 #include "cpu.h"
 #include "hw/boards.h"
@@ -144,10 +143,9 @@  static void niagara_init(MachineState *machine)
             memory_region_add_subregion(get_system_memory(),
                                         NIAGARA_VDISK_BASE, &s->vdisk_ram);
             dinfo->is_default = 1;
-            rom_add_file_fixed(blk_bs(blk)->filename, NIAGARA_VDISK_BASE, -1);
+            rom_add_file_fixed(blk_name(blk), NIAGARA_VDISK_BASE, -1);
         } else {
-            error_report("could not load ram disk '%s'",
-                         blk_bs(blk)->filename);
+            error_report("could not load ram disk '%s'", blk_name(blk));
             exit(1);
         }
     }