From: Bill Davidsen <davidsen@tmr.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: Xiantao Zhang <xiantao.zhang@intel.com>,
kvm-ia64@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>, Avi Kivity <avi@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: remove redundant NULL tests
Date: Sat, 16 Jan 2010 13:29:05 -0500 [thread overview]
Message-ID: <4B520571.7050502@tmr.com> (raw)
In-Reply-To: <4B4F4EF6.2050202@gmail.com>
Roel Kluin wrote:
> kvm_get_exit_data() cannot return a NULL pointer.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> arch/ia64/kvm/kvm_fw.c | 28 +++++++++++++---------------
> 1 files changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/arch/ia64/kvm/kvm_fw.c b/arch/ia64/kvm/kvm_fw.c
> index e4b8231..cb548ee 100644
> --- a/arch/ia64/kvm/kvm_fw.c
> +++ b/arch/ia64/kvm/kvm_fw.c
> @@ -75,7 +75,7 @@ static void set_pal_result(struct kvm_vcpu *vcpu,
> struct exit_ctl_data *p;
>
> p = kvm_get_exit_data(vcpu);
> - if (p && p->exit_reason == EXIT_REASON_PAL_CALL) {
> + if (p->exit_reason == EXIT_REASON_PAL_CALL) {
> p->u.pal_data.ret = result;
> return ;
> }
[___etc___]
Clearly the original author thought that there was a path where kvm_exit_data
could return a NULL pointer, was that ever possible?
--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
next prev parent reply other threads:[~2010-01-16 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 17:05 [PATCH] KVM: remove redundant NULL tests Roel Kluin
2010-01-16 18:29 ` Bill Davidsen [this message]
2010-01-17 3:19 ` Zhang, Xiantao
2010-01-17 12:26 ` Avi Kivity
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=4B520571.7050502@tmr.com \
--to=davidsen@tmr.com \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=kvm-ia64@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
--cc=xiantao.zhang@intel.com \
/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).