qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
	qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Michael Tokarev" <mjt@tls.msk.ru>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"David Hildenbrand" <david@redhat.com>
Subject: Re: [PATCH] system/physmem: remove redundant arg reassignment
Date: Mon, 26 Feb 2024 09:54:03 +0100	[thread overview]
Message-ID: <ec595183-df69-4cca-a930-2308488fb0c4@linaro.org> (raw)
In-Reply-To: <9cafaeae-78a2-47e6-b2f4-4ea89c2ab1a4@linaro.org>

On 15/2/24 12:09, Philippe Mathieu-Daudé wrote:
> On 15/2/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)
> 
> Better update the declaration in the same commit:
> 
> -- >8 --
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index 177be23db7..bf4db3b374 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -2960,7 +2960,7 @@ MemTxResult flatview_read_continue(FlatView *fv, 
> hwaddr addr,
>                                      MemTxAttrs attrs, void *buf,
>                                      hwaddr len, hwaddr addr1, hwaddr l,
>                                      MemoryRegion *mr);
> -void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr);
> +void *qemu_map_ram_ptr(RAMBlock *block, ram_addr_t addr);

FYI this is now merged as commit aab4631a4a ("system/physmem:
remove redundant arg reassignment").

> 
>   /* Internal functions, part of the implementation of 
> address_space_read_cached
>    * and address_space_write_cached.  */
> ---
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 



      reply	other threads:[~2024-02-26  8:54 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
2024-02-15  9:38 ` Michael Tokarev
2024-02-15 11:09 ` Philippe Mathieu-Daudé
2024-02-26  8:54   ` 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=ec595183-df69-4cca-a930-2308488fb0c4@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=david@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --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).