diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-19 20:09:43 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-19 20:58:28 -0400 |
commit | 8bfd4e023f5fb5793d7d7483b6e17e04933c53e9 (patch) | |
tree | 6a334ab7f0af78ce0aac94c3f52625340b1bdc4e /drivers/xen | |
parent | 30edc14bf39afde24ef7db2de66c91805db80828 (diff) | |
download | linux-stable-8bfd4e023f5fb5793d7d7483b6e17e04933c53e9.tar.gz linux-stable-8bfd4e023f5fb5793d7d7483b6e17e04933c53e9.tar.bz2 linux-stable-8bfd4e023f5fb5793d7d7483b6e17e04933c53e9.zip |
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')
-rw-r--r-- | drivers/xen/xen-pciback/conf_space.c | 4 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/conf_space_header.c | 42 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/pci_stub.c | 6 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/pciback.h | 6 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/xenbus.c | 16 |
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 @@ static int permissive; module_param(permissive, bool, 0644); -#define DEFINE_PCI_CONFIG(op, size, type) \ -int pciback_##op##_config_##size \ +#define DEFINE_PCI_CONFIG(op, size, type) \ +int pciback_##op##_config_##size \ (struct pci_dev *dev, int offset, type value, void *data) \ { \ 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[] = { {} }; -#define CFG_FIELD_BAR(reg_offset) \ - { \ - .offset = reg_offset, \ - .size = 4, \ - .init = bar_init, \ - .reset = bar_reset, \ - .release = bar_release, \ - .u.dw.read = bar_read, \ - .u.dw.write = bar_write, \ - } - -#define CFG_FIELD_ROM(reg_offset) \ - { \ - .offset = reg_offset, \ - .size = 4, \ - .init = rom_init, \ - .reset = bar_reset, \ - .release = bar_release, \ - .u.dw.read = bar_read, \ - .u.dw.write = rom_write, \ - } +#define CFG_FIELD_BAR(reg_offset) \ + { \ + .offset = reg_offset, \ + .size = 4, \ + .init = bar_init, \ + .reset = bar_reset, \ + .release = bar_release, \ + .u.dw.read = bar_read, \ + .u.dw.write = bar_write, \ + } + +#define CFG_FIELD_ROM(reg_offset) \ + { \ + .offset = reg_offset, \ + .size = 4, \ + .init = rom_init, \ + .reset = bar_reset, \ + .release = bar_release, \ + .u.dw.read = bar_read, \ + .u.dw.write = rom_write, \ + } static const struct config_field header_0[] = { 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 @@ #include <linux/pci.h> #include <linux/wait.h> #include <linux/sched.h> -#include <asm/atomic.h> +#include <linux/atomic.h> #include <xen/events.h> #include <asm/xen/pci.h> #include <asm/xen/hypervisor.h> @@ -486,7 +486,7 @@ static void pcistub_remove(struct pci_dev *dev) } } -static const struct pci_device_id pcistub_ids[] = { +static DEFINE_PCI_DEVICE_TABLE(pcistub_ids) = { { .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, @@ -592,7 +592,7 @@ static pci_ers_result_t common_process(struct pcistub_device *psdev, if (test_bit(_XEN_PCIF_active, (unsigned long *)&psdev->pdev->sh_info->flags)) { dev_dbg(&psdev->dev->dev, - "schedule pci_conf service in pciback \n"); + "schedule pci_conf service in pciback\n"); test_and_schedule_op(psdev->pdev); } 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 @@ #include <linux/list.h> #include <linux/spinlock.h> #include <linux/workqueue.h> -#include <asm/atomic.h> +#include <linux/atomic.h> #include <xen/interface/io/pciif.h> struct pci_dev_entry { @@ -20,8 +20,8 @@ struct pci_dev_entry { struct pci_dev *dev; }; -#define _PDEVF_op_active (0) -#define PDEVF_op_active (1<<(_PDEVF_op_active)) +#define _PDEVF_op_active (0) +#define PDEVF_op_active (1<<(_PDEVF_op_active)) #define _PCIB_op_pending (1) #define PCIB_op_pending (1<<(_PCIB_op_pending)) 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[] = { }; static struct xenbus_driver xenbus_pciback_driver = { - .name = "pciback", - .owner = THIS_MODULE, - .ids = xenpci_ids, - .probe = pciback_xenbus_probe, - .remove = pciback_xenbus_remove, - .otherend_changed = pciback_frontend_changed, + .name = "pciback", + .owner = THIS_MODULE, + .ids = xenpci_ids, + .probe = pciback_xenbus_probe, + .remove = pciback_xenbus_remove, + .otherend_changed = pciback_frontend_changed, }; int __init pciback_xenbus_register(void) { pciback_wq = create_workqueue("pciback_workqueue"); if (!pciback_wq) { - printk(KERN_ERR "pciback_xenbus_register: create" - "pciback_workqueue failed\n"); + printk(KERN_ERR "%s: create" + "pciback_workqueue failed\n", __func__); return -EFAULT; } return xenbus_register_backend(&xenbus_pciback_driver); |