From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] gnttab: remove pointless NULL check
Date: Tue, 17 Apr 2012 13:45:19 +0100 [thread overview]
Message-ID: <CBB3246F.3DFA9%keir@xen.org> (raw)
In-Reply-To: <4F8D7F87020000780007E776@nat28.tlf.novell.com>
On 17/04/2012 13:34, "Jan Beulich" <JBeulich@suse.com> wrote:
> Domains in the domain hash (and hence locatable via the usual lookup
> functions) can't have a NULL grant table pointer; no other function
> performs such a check, so remove it from gnttab_prepare_for_transfer()
> for consistency.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -1390,17 +1390,11 @@ static int
> gnttab_prepare_for_transfer(
> struct domain *rd, struct domain *ld, grant_ref_t ref)
> {
> - struct grant_table *rgt;
> + struct grant_table *rgt = rd->grant_table;
> grant_entry_header_t *sha;
> union grant_combo scombo, prev_scombo, new_scombo;
> int retries = 0;
>
> - if ( unlikely((rgt = rd->grant_table) == NULL) )
> - {
> - gdprintk(XENLOG_INFO, "Dom %d has no grant table.\n", rd->domain_id);
> - return 0;
> - }
> -
> spin_lock(&rgt->lock);
>
> if ( rgt->gt_version == 0 )
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
prev parent reply other threads:[~2012-04-17 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 12:34 [PATCH] gnttab: remove pointless NULL check Jan Beulich
2012-04-17 12:45 ` Keir Fraser [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=CBB3246F.3DFA9%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.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).