qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-9.1 v2] hw/ide/pci.c: Remove dead code from bmdma_prepare


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH-for-9.1 v2] hw/ide/pci.c: Remove dead code from bmdma_prepare_buf()
Date: Tue, 6 Aug 2024 10:32:05 +0200
User-agent: Mozilla Thunderbird

On 5/8/24 20:24, Philippe Mathieu-Daudé wrote:
From: Peter Maydell <peter.maydell@linaro.org>

Coverity notes that the code at the end of the loop in
bmdma_prepare_buf() is unreachable.  This is because in commit
9fbf0fa81fca8f527 ("ide: remove hardcoded 2GiB transactional limit")
we removed the only codepath in the loop which could "break" out of
it, but didn't notice that this meant we should also remove the code
at the end of the loop.

Remove the dead code.

Resolves: Coverity CID 1547772
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
v2: Break and return once at EOF
---
  hw/ide/pci.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)

Patch queued.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]