From: ebiederm@xmission.com (Eric W. Biederman)
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linux-pci@atrey.karlin.mff.cuni.cz,
Greg Kroah-Hartman <greg@kroah.com>,
"David S. Miller" <davem@davemloft.net>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
<linux-kernel@vger.kernel.org>, Andrew Morton <akpm@osdl.org>,
<daniel.e.wolstenholme@intel.com>
Subject: Re: [PATCH 1/21] MSI: Simplify BUG() handling in pci_disable_msi()
Date: Tue, 27 Mar 2007 21:19:23 -0600 [thread overview]
Message-ID: <m1tzw6t5qc.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070322105328.4AB74DDF3D@ozlabs.org> (Michael Ellerman's message of "Thu, 22 Mar 2007 21:51:27 +1100")
Michael Ellerman <michael@ellerman.id.au> writes:
> Although it might be nice to do a printk before BUG'ing, it's really not
> necessary, and it complicates the code.
>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
>
> drivers/pci/msi.c | 19 ++++++++-----------
> 1 file changed, 8 insertions(+), 11 deletions(-)
>
> Index: msi-new/drivers/pci/msi.c
> ===================================================================
> --- msi-new.orig/drivers/pci/msi.c
> +++ msi-new/drivers/pci/msi.c
> @@ -646,18 +646,15 @@ void pci_disable_msi(struct pci_dev* dev
> if (!entry || !entry->dev || entry->msi_attrib.type != PCI_CAP_ID_MSI) {
> return;
> }
> - if (irq_has_action(dev->first_msi_irq)) {
> - printk(KERN_WARNING "PCI: %s: pci_disable_msi() called without "
> - "free_irq() on MSI irq %d\n",
> - pci_name(dev), dev->first_msi_irq);
> - BUG_ON(irq_has_action(dev->first_msi_irq));
> - } else {
> - default_irq = entry->msi_attrib.default_irq;
> - msi_free_irq(dev, dev->first_msi_irq);
>
> - /* Restore dev->irq to its default pin-assertion irq */
> - dev->irq = default_irq;
> - }
> + BUG_ON(irq_has_action(dev->first_msi_irq));
> +
> + default_irq = entry->msi_attrib.default_irq;
> + msi_free_irq(dev, dev->first_msi_irq);
> +
> + /* Restore dev->irq to its default pin-assertion irq */
> + dev->irq = default_irq;
> +
> dev->first_msi_irq = 0;
> }
>
parent reply other threads:[~2007-03-28 3:20 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20070322105328.4AB74DDF3D@ozlabs.org>]
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=m1tzw6t5qc.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=daniel.e.wolstenholme@intel.com \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=michael@ellerman.id.au \
/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
all inboxes | Powered by JetHome®