From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: John Snow <jsnow@redhat.com>,
qemu-block@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Kevin Wolf <kwolf@redhat.com>
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 [thread overview]
Message-ID: <ea16ae81-a003-4190-8d7a-af6d7bf79e6a@linaro.org> (raw)
In-Reply-To: <20240805182419.22239-1-philmd@linaro.org>
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.
prev parent reply other threads:[~2024-08-06 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 18:24 [PATCH-for-9.1 v2] hw/ide/pci.c: Remove dead code from bmdma_prepare_buf() Philippe Mathieu-Daudé
2024-08-05 23:13 ` Richard Henderson
2024-08-06 8:32 ` 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=ea16ae81-a003-4190-8d7a-af6d7bf79e6a@linaro.org \
--to=philmd@linaro.org \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@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).