]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/misc/bcm2835_property: Reduce scope of variables in mbox push function
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Jul 2024 13:10:29 +0000 (14:10 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Jul 2024 15:55:59 +0000 (16:55 +0100)
commit28fe81f052f1fcc651c4c4c098de68af73bbe4f6
treeb833d91b35552f8deae88f28500c46b6dd4ccef7
parent4b648238b8dd9870280b60ff32bf7fe2fe82607f
hw/misc/bcm2835_property: Reduce scope of variables in mbox push function

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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240723131029.1159908-5-peter.maydell@linaro.org
hw/misc/bcm2835_property.c