qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] sun4m: obey -vga none


From: Mark Cave-Ayland
Subject: Re: [Qemu-devel] [PATCH] sun4m: obey -vga none
Date: Tue, 19 Mar 2019 20:59:57 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 19/03/2019 14:40, Paolo Bonzini wrote:

> Do not create a TCX if "-vga none" was passed on the command line.
> Remove some dead code along the way to avoid big reindentation.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  hw/sparc/sun4m.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
> index ca1e3825d5..07d126aea8 100644
> --- a/hw/sparc/sun4m.c
> +++ b/hw/sparc/sun4m.c
> @@ -850,7 +850,6 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef,
>      uint32_t initrd_size;
>      DriveInfo *fd[MAX_FD];
>      FWCfgState *fw_cfg;
> -    unsigned int num_vsimms;
>      DeviceState *dev;
>      SysBusDevice *s;
>  
> @@ -909,8 +908,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef,
>          error_report("Unsupported depth: %d", graphic_depth);
>          exit (1);
>      }
> -    num_vsimms = 0;
> -    if (num_vsimms == 0) {
> +    if (vga_interface_type != VGA_NONE) {
>          if (vga_interface_type == VGA_CG3) {
>              if (graphic_depth != 8) {
>                  error_report("Unsupported depth: %d", graphic_depth);
> @@ -945,7 +943,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef,
>          }
>      }
>  
> -    for (i = num_vsimms; i < MAX_VSIMMS; i++) {
> +    for (i = 0; i < MAX_VSIMMS; i++) {
>          /* vsimm registers probed by OBP */
>          if (hwdef->vsimm[i].reg_base) {
>              empty_slot_init(hwdef->vsimm[i].reg_base, 0x2000);
> 

Looks sensible to me - I've always wondered why the num_vsimms code was written 
like
this, but I can't see that this will change any existing behaviour.

Reviewed-by: Mark Cave-Ayland <address@hidden>


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]