From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Peter Maydell <peter.maydell@linaro.org>, <qemu-arm@nongnu.org>,
<qemu-devel@nongnu.org>
Cc: patches@linaro.org
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH] target-arm: Fix unreachable code in gicv3_class_name()
Date: Tue, 12 Jul 2016 09:23:29 +0800 [thread overview]
Message-ID: <57844691.1000001@huawei.com> (raw)
In-Reply-To: <1468260552-8400-1-git-send-email-peter.maydell@linaro.org>
On 2016/7/12 2:09, Peter Maydell wrote:
> Coverity complains that the exit() in gicv3_class_name()
> can be unreachable, because if TARGET_AARCH64 is defined
> then all code paths return before reaching it. Move the
> exit() up to the error_report() that it belongs with.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> target-arm/machine.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target-arm/machine.c b/target-arm/machine.c
> index 2dbeb82..7a6ca31 100644
> --- a/target-arm/machine.c
> +++ b/target-arm/machine.c
> @@ -340,10 +340,9 @@ const char *gicv3_class_name(void)
> #else
> error_report("KVM GICv3 acceleration is not supported on this "
> "platform");
> + exit(1);
> #endif
> } else {
> return "arm-gicv3";
> }
> -
> - exit(1);
> }
>
--
Shannon
WARNING: multiple messages have this Message-ID (diff)
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] target-arm: Fix unreachable code in gicv3_class_name()
Date: Tue, 12 Jul 2016 09:23:29 +0800 [thread overview]
Message-ID: <57844691.1000001@huawei.com> (raw)
In-Reply-To: <1468260552-8400-1-git-send-email-peter.maydell@linaro.org>
On 2016/7/12 2:09, Peter Maydell wrote:
> Coverity complains that the exit() in gicv3_class_name()
> can be unreachable, because if TARGET_AARCH64 is defined
> then all code paths return before reaching it. Move the
> exit() up to the error_report() that it belongs with.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> target-arm/machine.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target-arm/machine.c b/target-arm/machine.c
> index 2dbeb82..7a6ca31 100644
> --- a/target-arm/machine.c
> +++ b/target-arm/machine.c
> @@ -340,10 +340,9 @@ const char *gicv3_class_name(void)
> #else
> error_report("KVM GICv3 acceleration is not supported on this "
> "platform");
> + exit(1);
> #endif
> } else {
> return "arm-gicv3";
> }
> -
> - exit(1);
> }
>
--
Shannon
next prev parent reply other threads:[~2016-07-12 1:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 18:09 [Qemu-arm] [PATCH] target-arm: Fix unreachable code in gicv3_class_name() Peter Maydell
2016-07-11 18:09 ` [Qemu-devel] " Peter Maydell
2016-07-12 1:23 ` Shannon Zhao [this message]
2016-07-12 1:23 ` Shannon Zhao
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=57844691.1000001@huawei.com \
--to=zhaoshenglong@huawei.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.