qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/8] ppc/pnv: Remove useless variable


From: David Gibson
Subject: Re: [PATCH 4/8] ppc/pnv: Remove useless variable
Date: Thu, 2 Sep 2021 11:36:28 +1000

On Wed, Sep 01, 2021 at 11:41:49AM +0200, Cédric Le Goater wrote:
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Applied to ppc-for-6.2.

> ---
>  hw/ppc/pnv.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 2f5358b70c95..a62e90b15e27 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -838,8 +838,7 @@ static void pnv_init(MachineState *machine)
>      for (i = 0; i < pnv->num_chips; i++) {
>          char chip_name[32];
>          Object *chip = OBJECT(qdev_new(chip_typename));
> -        int chip_id = i;
> -        uint64_t chip_ram_size =  pnv_chip_get_ram_size(pnv, chip_id);
> +        uint64_t chip_ram_size =  pnv_chip_get_ram_size(pnv, i);
>  
>          pnv->chips[i] = PNV_CHIP(chip);
>  
> @@ -850,9 +849,9 @@ static void pnv_init(MachineState *machine)
>                                  &error_fatal);
>          chip_ram_start += chip_ram_size;
>  
> -        snprintf(chip_name, sizeof(chip_name), "chip[%d]", chip_id);
> +        snprintf(chip_name, sizeof(chip_name), "chip[%d]", i);
>          object_property_add_child(OBJECT(pnv), chip_name, chip);
> -        object_property_set_int(chip, "chip-id", chip_id, &error_fatal);
> +        object_property_set_int(chip, "chip-id", i, &error_fatal);
>          object_property_set_int(chip, "nr-cores", machine->smp.cores,
>                                  &error_fatal);
>          object_property_set_int(chip, "nr-threads", machine->smp.threads,

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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