qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] hw/misc/bcm2835_property: Reduce scope of variables in m


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 4/4] hw/misc/bcm2835_property: Reduce scope of variables in mbox push function
Date: Tue, 23 Jul 2024 15:35:17 +0200
User-agent: Mozilla Thunderbird

On 23/7/24 15:10, Peter Maydell wrote:
In bcm2835_property_mbox_push(), some variables are defined at function scope
but used only in a smaller scope of the function:
  * tag, bufsize, resplen are used only in the body of the while() loop
  * tmp is used only for RPI_FWREQ_SET_POWER_STATE (and is badly named)

Declare these variables in the scope where they're needed, so the code
is easier to read.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  hw/misc/bcm2835_property.c | 21 ++++++++++-----------
  1 file changed, 10 insertions(+), 11 deletions(-)

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




reply via email to

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