All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: [PATCH] xen/pci: Remove unused dev_err() string
Date: Mon, 14 Apr 2014 16:25:23 -0600	[thread overview]
Message-ID: <20140414222523.15032.99127.stgit@bhelgaas-glaptop.roam.corp.google.com> (raw)

We previously verified that "action" is either BUS_NOTIFY_ADD_DEVICE or
BUS_NOTIFY_DEL_DEVICE, so there's no need for the default "?" case.

Found by Coverity (CID 146520).

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/xen/pci.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
index dd9c249ea311..59a25f937bd7 100644
--- a/drivers/xen/pci.c
+++ b/drivers/xen/pci.c
@@ -177,8 +177,7 @@ static int xen_pci_notifier(struct notifier_block *nb,
 	}
 	if (r)
 		dev_err(dev, "Failed to %s - passthrough or MSI/MSI-X might fail!\n",
-			action == BUS_NOTIFY_ADD_DEVICE ? "add" :
-			(action == BUS_NOTIFY_DEL_DEVICE ? "delete" : "?"));
+			action == BUS_NOTIFY_ADD_DEVICE ? "add" : "del");
 	return NOTIFY_OK;
 }
 


             reply	other threads:[~2014-04-14 22:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 22:25 Bjorn Helgaas [this message]
2014-04-15 13:03 ` [PATCH] xen/pci: Remove unused dev_err() string Konrad Rzeszutek Wilk
2014-04-15 13:29   ` David Vrabel
2014-04-15 13:29   ` David Vrabel
2014-04-15 15:20     ` Konrad Rzeszutek Wilk
2014-04-15 15:20     ` Konrad Rzeszutek Wilk
2014-04-15 13:03 ` Konrad Rzeszutek Wilk
2014-04-14 22:25 Bjorn Helgaas

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=20140414222523.15032.99127.stgit@bhelgaas-glaptop.roam.corp.google.com \
    --to=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.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.