From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
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 [thread overview]
Message-ID: <e055dc07-a7ac-4243-b97a-98c1cb702c2f@linaro.org> (raw)
In-Reply-To: <20240723131029.1159908-5-peter.maydell@linaro.org>
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>
prev parent reply other threads:[~2024-07-23 13:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 13:10 [PATCH 0/4] hw/misc/bcm2835_property: Fix set-palette, OTP-access properties Peter Maydell
2024-07-23 13:10 ` [PATCH 1/4] hw/misc/bcm2835_property: Fix handling of FRAMEBUFFER_SET_PALETTE Peter Maydell
2024-07-25 11:49 ` Philippe Mathieu-Daudé
2024-07-23 13:10 ` [PATCH 2/4] hw/misc/bcm2835_property: Avoid overflow in OTP access properties Peter Maydell
2024-07-24 7:06 ` Philippe Mathieu-Daudé
2024-07-24 12:31 ` Peter Maydell
2024-07-25 6:57 ` Philippe Mathieu-Daudé
2024-08-02 7:02 ` Michael Tokarev
2024-08-02 7:13 ` Michael Tokarev
2024-07-23 13:10 ` [PATCH 3/4] hw/misc/bcm2835_property: Restrict scope of start_num, number, otp_row Peter Maydell
2024-07-23 13:36 ` Philippe Mathieu-Daudé
2024-07-23 13:10 ` [PATCH 4/4] hw/misc/bcm2835_property: Reduce scope of variables in mbox push function Peter Maydell
2024-07-23 13:35 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e055dc07-a7ac-4243-b97a-98c1cb702c2f@linaro.org \
--to=philmd@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).