Re: [PATCH v3 3/4] system/physmem.c: remove useless assertion of block

"Sergei Heifetz" <[email protected]>
Newsgroups org.nongnu.qemu-trivial,org.nongnu.qemu-devel
Message-ID <[email protected]>
On Wed Mar 11, 2026 at 3:51 PM +05, Peter Maydell wrote:
> On Sun, 8 Feb 2026 at 10:41, Sergei Heifetz <[email protected]> wrote:
>>
>> It is useless to assert that block is not NULL because
>> it is already dereferenced in the first line of the function.
>>
>> We could split the declaration and initialization of oldsize,
>> but then we would need to remove the const qualifier.
>> This seems worse, as the assertion would be almost useless anyway.
>>
>> Signed-off-by: Sergei Heifetz <[email protected]>
>
> The commit message fails to note the information found during
> review of the previous version:
>  * this function is called from only two places
>  * those places already either assert or assume that the
>    block argument is not NULL
> So the assertion is not getting us anything.
>
> With the commit message updated:
>
> Reviewed-by: Peter Maydell <[email protected]>
>
> thanks
> -- PMM

Sorry, I should've included this information in the commit
message in the first place. I'll update it and resubmit
the series. Thank you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.