All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: xen-devel <xen-devel@lists.xensource.com>
Cc: Keir Fraser <keir.fraser@citrix.com>
Subject: [PATCH][LINUX] don't WARN_ON -ENOSYS from PHYSDEVOP_manage_pci_remove
Date: Thu, 07 Aug 2008 15:17:10 -0600	[thread overview]
Message-ID: <1218143830.4867.69.camel@lappy> (raw)


We let -ENOSYS slip through on the add side to support old hypervisors,
let's do the same on the remove end so we don't get stack dumps during
bootup.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
--

diff -r 2866e6af503e drivers/xen/core/pci.c
--- a/drivers/xen/core/pci.c	Thu Jul 31 15:33:54 2008 +0100
+++ b/drivers/xen/core/pci.c	Thu Aug 07 15:14:07 2008 -0600
@@ -23,9 +23,13 @@ static int pci_bus_probe_wrapper(struct 
 		return r;
 
 	r = pci_bus_probe(dev);
-	if (r)
-		WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
-					      &manage_pci));
+	if (r) {
+		int ret;
+
+		ret = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
+					    &manage_pci);
+		WARN_ON(ret && ret != -ENOSYS);
+	}
 
 	return r;
 }

                 reply	other threads:[~2008-08-07 21:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1218143830.4867.69.camel@lappy \
    --to=alex.williamson@hp.com \
    --cc=keir.fraser@citrix.com \
    --cc=xen-devel@lists.xensource.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 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.