From: David Hildenbrand <david@redhat.com>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Michael Tokarev" <mjt@tls.msk.ru>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Xu" <peterx@redhat.com>
Subject: Re: [PATCH] system/physmem: remove redundant arg reassignment
Date: Thu, 15 Feb 2024 10:37:14 +0100 [thread overview]
Message-ID: <c44b25e2-a56d-4965-aad7-b011fae4c6c6@redhat.com> (raw)
In-Reply-To: <20240215091506.1932251-1-manos.pitsidianakis@linaro.org>
On 15.02.24 10:15, Manos Pitsidianakis wrote:
> Arguments `ram_block` are reassigned to local declarations `block`
> without further use. Remove re-assignment to reduce noise.
>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
> system/physmem.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/system/physmem.c b/system/physmem.c
> index 5e66d9ae36..d4c3bfac65 100644
> --- a/system/physmem.c
> +++ b/system/physmem.c
> @@ -2154,10 +2154,8 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length)
> *
> * Called within RCU critical section.
> */
> -void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr)
> +void *qemu_map_ram_ptr(RAMBlock *block, ram_addr_t addr)
> {
> - RAMBlock *block = ram_block;
> -
> if (block == NULL) {
> block = qemu_get_ram_block(addr);
> addr -= block->offset;
> @@ -2182,10 +2180,9 @@ void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr)
> *
> * Called within RCU critical section.
> */
> -static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
> +static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr,
> hwaddr *size, bool lock)
> {
> - RAMBlock *block = ram_block;
> if (*size == 0) {
> return NULL;
> }
>
> base-commit: 5767815218efd3cbfd409505ed824d5f356044ae
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-02-15 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 9:15 [PATCH] system/physmem: remove redundant arg reassignment Manos Pitsidianakis
2024-02-15 9:37 ` David Hildenbrand [this message]
2024-02-15 9:38 ` Michael Tokarev
2024-02-15 11:09 ` Philippe Mathieu-Daudé
2024-02-26 8:54 ` Philippe Mathieu-Daudé
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=c44b25e2-a56d-4965-aad7-b011fae4c6c6@redhat.com \
--to=david@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).