From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: gregkh@linuxfoundation.org, xen-devel@lists.xenproject.org,
linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com,
david.vrabel@citrix.com
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH v5 6/6] xen/pciback: Remove tons of dereferences
Date: Mon, 14 Jul 2014 12:18:56 -0400 [thread overview]
Message-ID: <1405354736-7358-7-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1405354736-7358-1-git-send-email-konrad.wilk@oracle.com>
A little cleanup. No functional difference.
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
drivers/xen/xen-pciback/pci_stub.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index 121c725..1ddd22f 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -631,10 +631,12 @@ static pci_ers_result_t common_process(struct pcistub_device *psdev,
{
pci_ers_result_t res = result;
struct xen_pcie_aer_op *aer_op;
+ struct xen_pcibk_device *pdev = psdev->pdev;
+ struct xen_pci_sharedinfo *sh_info = pdev->sh_info;
int ret;
/*with PV AER drivers*/
- aer_op = &(psdev->pdev->sh_info->aer_op);
+ aer_op = &(sh_info->aer_op);
aer_op->cmd = aer_cmd ;
/*useful for error_detected callback*/
aer_op->err = state;
@@ -655,36 +657,36 @@ static pci_ers_result_t common_process(struct pcistub_device *psdev,
* this flag to judge whether we need to check pci-front give aer
* service ack signal
*/
- set_bit(_PCIB_op_pending, (unsigned long *)&psdev->pdev->flags);
+ set_bit(_PCIB_op_pending, (unsigned long *)&pdev->flags);
/*It is possible that a pcifront conf_read_write ops request invokes
* the callback which cause the spurious execution of wake_up.
* Yet it is harmless and better than a spinlock here
*/
set_bit(_XEN_PCIB_active,
- (unsigned long *)&psdev->pdev->sh_info->flags);
+ (unsigned long *)&sh_info->flags);
wmb();
- notify_remote_via_irq(psdev->pdev->evtchn_irq);
+ notify_remote_via_irq(pdev->evtchn_irq);
ret = wait_event_timeout(xen_pcibk_aer_wait_queue,
!(test_bit(_XEN_PCIB_active, (unsigned long *)
- &psdev->pdev->sh_info->flags)), 300*HZ);
+ &sh_info->flags)), 300*HZ);
if (!ret) {
if (test_bit(_XEN_PCIB_active,
- (unsigned long *)&psdev->pdev->sh_info->flags)) {
+ (unsigned long *)&sh_info->flags)) {
dev_err(&psdev->dev->dev,
"pcifront aer process not responding!\n");
clear_bit(_XEN_PCIB_active,
- (unsigned long *)&psdev->pdev->sh_info->flags);
+ (unsigned long *)&sh_info->flags);
aer_op->err = PCI_ERS_RESULT_NONE;
return res;
}
}
- clear_bit(_PCIB_op_pending, (unsigned long *)&psdev->pdev->flags);
+ clear_bit(_PCIB_op_pending, (unsigned long *)&pdev->flags);
if (test_bit(_XEN_PCIF_active,
- (unsigned long *)&psdev->pdev->sh_info->flags)) {
+ (unsigned long *)&sh_info->flags)) {
dev_dbg(&psdev->dev->dev,
"schedule pci_conf service in " DRV_NAME "\n");
xen_pcibk_test_and_schedule_op(psdev->pdev);
--
1.9.3
next prev parent reply other threads:[~2014-07-14 16:19 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 16:18 [PATCH v5] Fixes to Xen pciback for 3.17 Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 1/6] xen-pciback: Document the various parameters and attributes in SysFS Konrad Rzeszutek Wilk
2014-07-28 13:04 ` David Vrabel
2014-07-28 14:56 ` Greg KH
2014-08-01 14:59 ` [Xen-devel] " David Vrabel
2014-07-14 16:18 ` [PATCH v5 2/6] xen/pciback: Don't deadlock when unbinding Konrad Rzeszutek Wilk
2014-07-28 13:06 ` David Vrabel
2014-08-04 18:42 ` Konrad Rzeszutek Wilk
2014-08-05 9:27 ` [Xen-devel] " David Vrabel
2014-07-14 16:18 ` [PATCH v5 3/6] driver core: Provide an wrapper around the mutex to do lockdep warnings Konrad Rzeszutek Wilk
2014-07-14 17:39 ` Greg KH
2014-07-14 16:18 ` [PATCH v5 4/6] xen/pciback: Include the domain id if removing the device whilst still in use Konrad Rzeszutek Wilk
2014-07-14 16:18 ` [PATCH v5 5/6] xen/pciback: Print out the domain owning the device Konrad Rzeszutek Wilk
2014-07-14 16:18 ` Konrad Rzeszutek Wilk [this message]
2014-07-14 17:40 ` [PATCH v5] Fixes to Xen pciback for 3.17 Greg KH
2014-07-14 17:39 ` Konrad Rzeszutek Wilk
2014-08-01 15:30 ` David Vrabel
2014-08-04 18:43 ` Konrad Rzeszutek Wilk
2014-08-05 8:44 ` [Xen-devel] " Sander Eikelenboom
2014-08-05 9:31 ` David Vrabel
2014-08-05 9:44 ` Sander Eikelenboom
2014-08-05 13:49 ` Konrad Rzeszutek Wilk
2014-08-05 14:04 ` Sander Eikelenboom
2014-08-06 18:59 ` Sander Eikelenboom
2014-08-06 19:18 ` Konrad Rzeszutek Wilk
2014-08-06 19:25 ` Sander Eikelenboom
2014-08-06 19:39 ` Konrad Rzeszutek Wilk
2014-08-06 19:47 ` Sander Eikelenboom
2014-08-06 20:09 ` Konrad Rzeszutek Wilk
2014-08-06 20:17 ` Sander Eikelenboom
2014-08-06 22:08 ` Sander Eikelenboom
2014-08-07 9:04 ` David Vrabel
2014-08-25 17:18 ` Sander Eikelenboom
2014-08-05 14:33 ` Sander Eikelenboom
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=1405354736-7358-7-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=gregkh@linuxfoundation.org \
--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 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®