aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xen-pciback
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-07-19 20:09:43 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-07-19 20:58:28 -0400
commit8bfd4e023f5fb5793d7d7483b6e17e04933c53e9 (patch)
tree6a334ab7f0af78ce0aac94c3f52625340b1bdc4e /drivers/xen/xen-pciback
parent30edc14bf39afde24ef7db2de66c91805db80828 (diff)
xen/pciback: Cleanup the driver based on checkpatch warnings and errors.
Checkpatch found some extra warnings and errors. This mega patch fixes them all in one big swoop. We also spruce up the pcistub_ids to use DEFINE_PCI_DEVICE_TABLE macro (suggested by Jan Beulich). Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/xen-pciback')
-rw-r--r--drivers/xen/xen-pciback/conf_space.c4
-rw-r--r--drivers/xen/xen-pciback/conf_space_header.c42
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c6
-rw-r--r--drivers/xen/xen-pciback/pciback.h6
-rw-r--r--drivers/xen/xen-pciback/xenbus.c16
5 files changed, 37 insertions, 37 deletions
diff --git a/drivers/xen/xen-pciback/conf_space.c b/drivers/xen/xen-pciback/conf_space.c
index 370c18e58d7a..eb6bba044438 100644
--- a/drivers/xen/xen-pciback/conf_space.c
+++ b/drivers/xen/xen-pciback/conf_space.c
@@ -18,8 +18,8 @@
18static int permissive; 18static int permissive;
19module_param(permissive, bool, 0644); 19module_param(permissive, bool, 0644);
20 20
21#define DEFINE_PCI_CONFIG(op, size, type) \ 21#define DEFINE_PCI_CONFIG(op, size, type) \
22int pciback_##op##_config_##size \ 22int pciback_##op##_config_##size \
23(struct pci_dev *dev, int offset, type value, void *data) \ 23(struct pci_dev *dev, int offset, type value, void *data) \
24{ \ 24{ \
25 return pci_##op##_config_##size(dev, offset, value); \ 25 return pci_##op##_config_##size(dev, offset, value); \
diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c
index 3ae7da137f7e..40166e04a2b9 100644
--- a/drivers/xen/xen-pciback/conf_space_header.c
+++ b/drivers/xen/xen-pciback/conf_space_header.c
@@ -249,27 +249,27 @@ static const struct config_field header_common[] = {
249 {} 249 {}
250}; 250};
251 251
252#define CFG_FIELD_BAR(reg_offset) \ 252#define CFG_FIELD_BAR(reg_offset) \
253 { \ 253 { \
254 .offset = reg_offset, \ 254 .offset = reg_offset, \
255 .size = 4, \ 255 .size = 4, \
256 .init = bar_init, \ 256 .init = bar_init, \
257 .reset = bar_reset, \ 257 .reset = bar_reset, \
258 .release = bar_release, \ 258 .release = bar_release, \
259 .u.dw.read = bar_read, \ 259 .u.dw.read = bar_read, \
260 .u.dw.write = bar_write, \ 260 .u.dw.write = bar_write, \
261 } 261 }
262 262
263#define CFG_FIELD_ROM(reg_offset) \ 263#define CFG_FIELD_ROM(reg_offset) \
264 { \ 264 { \
265 .offset = reg_offset, \ 265 .offset = reg_offset, \
266 .size = 4, \ 266 .size = 4, \
267 .init = rom_init, \ 267 .init = rom_init, \
268 .reset = bar_reset, \ 268 .reset = bar_reset, \
269 .release = bar_release, \ 269 .release = bar_release, \
270 .u.dw.read = bar_read, \ 270 .u.dw.read = bar_read, \
271 .u.dw.write = rom_write, \ 271 .u.dw.write = rom_write, \
272 } 272 }
273 273
274static const struct config_field header_0[] = { 274static const struct config_field header_0[] = {
275 CFG_FIELD_BAR(PCI_BASE_ADDRESS_0), 275 CFG_FIELD_BAR(PCI_BASE_ADDRESS_0),
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index 0b5a16b81c8c..e7853c340d7c 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -13,7 +13,7 @@
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/wait.h> 14#include <linux/wait.h>
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <asm/atomic.h> 16#include <linux/atomic.h>
17#include <xen/events.h> 17#include <xen/events.h>
18#include <asm/xen/pci.h> 18#include <asm/xen/pci.h>
19#include <asm/xen/hypervisor.h> 19#include <asm/xen/hypervisor.h>
@@ -486,7 +486,7 @@ static void pcistub_remove(struct pci_dev *dev)
486 } 486 }
487} 487}
488 488
489static const struct pci_device_id pcistub_ids[] = { 489static DEFINE_PCI_DEVICE_TABLE(pcistub_ids) = {
490 { 490 {
491 .vendor = PCI_ANY_ID, 491 .vendor = PCI_ANY_ID,
492 .device = PCI_ANY_ID, 492 .device = PCI_ANY_ID,
@@ -592,7 +592,7 @@ static pci_ers_result_t common_process(struct pcistub_device *psdev,
592 if (test_bit(_XEN_PCIF_active, 592 if (test_bit(_XEN_PCIF_active,
593 (unsigned long *)&psdev->pdev->sh_info->flags)) { 593 (unsigned long *)&psdev->pdev->sh_info->flags)) {
594 dev_dbg(&psdev->dev->dev, 594 dev_dbg(&psdev->dev->dev,
595 "schedule pci_conf service in pciback \n"); 595 "schedule pci_conf service in pciback\n");
596 test_and_schedule_op(psdev->pdev); 596 test_and_schedule_op(psdev->pdev);
597 } 597 }
598 598
diff --git a/drivers/xen/xen-pciback/pciback.h b/drivers/xen/xen-pciback/pciback.h
index 98e29127abf9..c1e95e88ee9e 100644
--- a/drivers/xen/xen-pciback/pciback.h
+++ b/drivers/xen/xen-pciback/pciback.h
@@ -12,7 +12,7 @@
12#include <linux/list.h> 12#include <linux/list.h>
13#include <linux/spinlock.h> 13#include <linux/spinlock.h>
14#include <linux/workqueue.h> 14#include <linux/workqueue.h>
15#include <asm/atomic.h> 15#include <linux/atomic.h>
16#include <xen/interface/io/pciif.h> 16#include <xen/interface/io/pciif.h>
17 17
18struct pci_dev_entry { 18struct pci_dev_entry {
@@ -20,8 +20,8 @@ struct pci_dev_entry {
20 struct pci_dev *dev; 20 struct pci_dev *dev;
21}; 21};
22 22
23#define _PDEVF_op_active (0) 23#define _PDEVF_op_active (0)
24#define PDEVF_op_active (1<<(_PDEVF_op_active)) 24#define PDEVF_op_active (1<<(_PDEVF_op_active))
25#define _PCIB_op_pending (1) 25#define _PCIB_op_pending (1)
26#define PCIB_op_pending (1<<(_PCIB_op_pending)) 26#define PCIB_op_pending (1<<(_PCIB_op_pending))
27 27
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index af6c25a1d729..c0984cb442ca 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -683,20 +683,20 @@ static const struct xenbus_device_id xenpci_ids[] = {
683}; 683};
684 684
685static struct xenbus_driver xenbus_pciback_driver = { 685static struct xenbus_driver xenbus_pciback_driver = {
686 .name = "pciback", 686 .name = "pciback",
687 .owner = THIS_MODULE, 687 .owner = THIS_MODULE,
688 .ids = xenpci_ids, 688 .ids = xenpci_ids,
689 .probe = pciback_xenbus_probe, 689 .probe = pciback_xenbus_probe,
690 .remove = pciback_xenbus_remove, 690 .remove = pciback_xenbus_remove,
691 .otherend_changed = pciback_frontend_changed, 691 .otherend_changed = pciback_frontend_changed,
692}; 692};
693 693
694int __init pciback_xenbus_register(void) 694int __init pciback_xenbus_register(void)
695{ 695{
696 pciback_wq = create_workqueue("pciback_workqueue"); 696 pciback_wq = create_workqueue("pciback_workqueue");
697 if (!pciback_wq) { 697 if (!pciback_wq) {
698 printk(KERN_ERR "pciback_xenbus_register: create" 698 printk(KERN_ERR "%s: create"
699 "pciback_workqueue failed\n"); 699 "pciback_workqueue failed\n", __func__);
700 return -EFAULT; 700 return -EFAULT;
701 } 701 }
702 return xenbus_register_backend(&xenbus_pciback_driver); 702 return xenbus_register_backend(&xenbus_pciback_driver);