All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86/MSI: drop bogus NULL check from pci_restore_msi_state()
Date: Thu, 23 Jul 2015 12:45:53 +0100	[thread overview]
Message-ID: <55B0D3F1.9000506@citrix.com> (raw)
In-Reply-To: <55B0EFA3020000780009486E@prv-mh.provo.novell.com>

On 23/07/15 12:44, Jan Beulich wrote:
> Commit 372900faf8 ("x86/MSI-X: reduce fiddling with control register
> during restore") introduced de-references of pdev before it gets
> checked against NULL. Instead of deferring the de-references, drop
> the pointless check - both call sites do that check already.
>
> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

So they do.

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- a/xen/arch/x86/msi.c
> +++ b/xen/arch/x86/msi.c
> @@ -1354,9 +1354,6 @@ int pci_restore_msi_state(struct pci_dev
>      if ( !use_msi )
>          return -EOPNOTSUPP;
>  
> -    if ( !pdev )
> -        return -EINVAL;
> -
>      ret = xsm_resource_setup_pci(XSM_PRIV,
>                                  (pdev->seg << 16) | (pdev->bus << 8) |
>                                  pdev->devfn);
>
>
>

      reply	other threads:[~2015-07-23 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 11:44 [PATCH] x86/MSI: drop bogus NULL check from pci_restore_msi_state() Jan Beulich
2015-07-23 11:45 ` Andrew Cooper [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=55B0D3F1.9000506@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.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.