Skip to content

Commit

Permalink
Merge branches 'pci/msi', 'pci/iommu' and 'pci/cleanup' into next
Browse files Browse the repository at this point in the history
* pci/msi:
  PCI/MSI: Fix memory leak in free_msi_irqs()

* pci/iommu:
  PCI: Add function 1 DMA alias quirk for HighPoint RocketRaid 642L
  PCI: Add bridge DMA alias quirk for ITE bridge

* pci/cleanup:
  PCI: Merge multi-line quoted strings
  PCI: Whitespace cleanup
  PCI: Move EXPORT_SYMBOL so it immediately follows function/variable
  • Loading branch information
Bjorn Helgaas committed Jun 11, 2014
4 parents 843a85c + b701c0b + c2e0fb9 + 227f064 commit 38a6148
Show file tree
Hide file tree
Showing 58 changed files with 780 additions and 951 deletions.
5 changes: 1 addition & 4 deletions drivers/pci/access.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ static int pci_vpd_pci22_wait(struct pci_dev *dev)
}

if (time_after(jiffies, timeout)) {
dev_printk(KERN_DEBUG, &dev->dev,
"vpd r/w failed. This is likely a firmware "
"bug on this device. Contact the card "
"vendor for a firmware update.");
dev_printk(KERN_DEBUG, &dev->dev, "vpd r/w failed. This is likely a firmware bug on this device. Contact the card vendor for a firmware update\n");
return -ETIMEDOUT;
}
if (fatal_signal_pending(current))
Expand Down
6 changes: 3 additions & 3 deletions drivers/pci/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
type_mask, alignf, alignf_data,
&pci_32_bit);
}
EXPORT_SYMBOL(pci_bus_alloc_resource);

void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { }

Expand Down Expand Up @@ -253,6 +254,7 @@ void pci_bus_add_device(struct pci_dev *dev)

dev->is_added = 1;
}
EXPORT_SYMBOL_GPL(pci_bus_add_device);

/**
* pci_bus_add_devices - start driver for PCI devices
Expand All @@ -279,6 +281,7 @@ void pci_bus_add_devices(const struct pci_bus *bus)
pci_bus_add_devices(child);
}
}
EXPORT_SYMBOL(pci_bus_add_devices);

/** pci_walk_bus - walk devices on/under bus, calling callback.
* @top bus whose devices should be walked
Expand Down Expand Up @@ -344,6 +347,3 @@ void pci_bus_put(struct pci_bus *bus)
}
EXPORT_SYMBOL(pci_bus_put);

EXPORT_SYMBOL(pci_bus_alloc_resource);
EXPORT_SYMBOL_GPL(pci_bus_add_device);
EXPORT_SYMBOL(pci_bus_add_devices);
17 changes: 9 additions & 8 deletions drivers/pci/host/pci-mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,9 @@ static inline struct mvebu_pcie *sys_to_pcie(struct pci_sys_data *sys)
return sys->private_data;
}

static struct mvebu_pcie_port *
mvebu_pcie_find_port(struct mvebu_pcie *pcie, struct pci_bus *bus,
int devfn)
static struct mvebu_pcie_port *mvebu_pcie_find_port(struct mvebu_pcie *pcie,
struct pci_bus *bus,
int devfn)
{
int i;

Expand Down Expand Up @@ -781,10 +781,10 @@ static void mvebu_pcie_add_bus(struct pci_bus *bus)
}

static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
const struct resource *res,
resource_size_t start,
resource_size_t size,
resource_size_t align)
const struct resource *res,
resource_size_t start,
resource_size_t size,
resource_size_t align)
{
if (dev->bus->number != 0)
return start;
Expand Down Expand Up @@ -834,7 +834,8 @@ static void mvebu_pcie_enable(struct mvebu_pcie *pcie)
* found, maps it.
*/
static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
struct device_node *np, struct mvebu_pcie_port *port)
struct device_node *np,
struct mvebu_pcie_port *port)
{
struct resource regs;
int ret = 0;
Expand Down
10 changes: 4 additions & 6 deletions drivers/pci/host/pcie-rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,8 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
else if (size == 2)
*val = (*val >> (8 * (where & 2))) & 0xffff;

dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x "
"where=0x%04x size=%d val=0x%08lx\n", bus->number,
devfn, where, size, (unsigned long)*val);
dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
bus->number, devfn, where, size, (unsigned long)*val);

return ret;
}
Expand All @@ -302,9 +301,8 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
if (ret != PCIBIOS_SUCCESSFUL)
return ret;

dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x "
"where=0x%04x size=%d val=0x%08lx\n", bus->number,
devfn, where, size, (unsigned long)val);
dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
bus->number, devfn, where, size, (unsigned long)val);

if (size == 1) {
shift = 8 * (where & 3);
Expand Down
6 changes: 2 additions & 4 deletions drivers/pci/hotplug/acpiphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ MODULE_LICENSE("GPL");
MODULE_PARM_DESC(disable, "disable acpiphp driver");
module_param_named(disable, acpiphp_disabled, bool, 0444);

/* export the attention callback registration methods */
EXPORT_SYMBOL_GPL(acpiphp_register_attention);
EXPORT_SYMBOL_GPL(acpiphp_unregister_attention);

static int enable_slot (struct hotplug_slot *slot);
static int disable_slot (struct hotplug_slot *slot);
static int set_attention_status (struct hotplug_slot *slot, u8 value);
Expand Down Expand Up @@ -104,6 +100,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
}
return retval;
}
EXPORT_SYMBOL_GPL(acpiphp_register_attention);


/**
Expand All @@ -124,6 +121,7 @@ int acpiphp_unregister_attention(struct acpiphp_attention_info *info)
}
return retval;
}
EXPORT_SYMBOL_GPL(acpiphp_unregister_attention);


/**
Expand Down
6 changes: 2 additions & 4 deletions drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,9 @@ static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data,
slot->slot = NULL;
bridge->nr_slots--;
if (retval == -EBUSY)
pr_warn("Slot %llu already registered by another "
"hotplug driver\n", sun);
pr_warn("Slot %llu already registered by another hotplug driver\n", sun);
else
pr_warn("acpiphp_register_hotplug_slot failed "
"(err code = 0x%x)\n", retval);
pr_warn("acpiphp_register_hotplug_slot failed (err code = 0x%x)\n", retval);
}
/* Even if the slot registration fails, we can still use it. */
}
Expand Down
18 changes: 9 additions & 9 deletions drivers/pci/hotplug/cpci_hotplug.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ struct cpci_hp_controller_ops {
int (*enable_irq) (void);
int (*disable_irq) (void);
int (*check_irq) (void *dev_id);
int (*hardware_test) (struct slot* slot, u32 value);
u8 (*get_power) (struct slot* slot);
int (*set_power) (struct slot* slot, int value);
int (*hardware_test) (struct slot *slot, u32 value);
u8 (*get_power) (struct slot *slot);
int (*set_power) (struct slot *slot, int value);
};

struct cpci_hp_controller {
Expand Down Expand Up @@ -89,13 +89,13 @@ int cpci_hp_stop(void);
u8 cpci_get_attention_status(struct slot *slot);
u8 cpci_get_latch_status(struct slot *slot);
u8 cpci_get_adapter_status(struct slot *slot);
u16 cpci_get_hs_csr(struct slot * slot);
u16 cpci_get_hs_csr(struct slot *slot);
int cpci_set_attention_status(struct slot *slot, int status);
int cpci_check_and_clear_ins(struct slot * slot);
int cpci_check_ext(struct slot * slot);
int cpci_clear_ext(struct slot * slot);
int cpci_led_on(struct slot * slot);
int cpci_led_off(struct slot * slot);
int cpci_check_and_clear_ins(struct slot *slot);
int cpci_check_ext(struct slot *slot);
int cpci_clear_ext(struct slot *slot);
int cpci_led_on(struct slot *slot);
int cpci_led_off(struct slot *slot);
int cpci_configure_slot(struct slot *slot);
int cpci_unconfigure_slot(struct slot *slot);

Expand Down
31 changes: 15 additions & 16 deletions drivers/pci/hotplug/cpci_hotplug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ static int thread_finished;
static int enable_slot(struct hotplug_slot *slot);
static int disable_slot(struct hotplug_slot *slot);
static int set_attention_status(struct hotplug_slot *slot, u8 value);
static int get_power_status(struct hotplug_slot *slot, u8 * value);
static int get_attention_status(struct hotplug_slot *slot, u8 * value);
static int get_adapter_status(struct hotplug_slot *slot, u8 * value);
static int get_latch_status(struct hotplug_slot *slot, u8 * value);
static int get_power_status(struct hotplug_slot *slot, u8 *value);
static int get_attention_status(struct hotplug_slot *slot, u8 *value);
static int get_adapter_status(struct hotplug_slot *slot, u8 *value);
static int get_latch_status(struct hotplug_slot *slot, u8 *value);

static struct hotplug_slot_ops cpci_hotplug_slot_ops = {
.enable_slot = enable_slot,
Expand Down Expand Up @@ -168,7 +168,7 @@ cpci_get_power_status(struct slot *slot)
}

static int
get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
{
struct slot *slot = hotplug_slot->private;

Expand All @@ -177,7 +177,7 @@ get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
}

static int
get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value)
get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
{
struct slot *slot = hotplug_slot->private;

Expand All @@ -192,14 +192,14 @@ set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
}

static int
get_adapter_status(struct hotplug_slot *hotplug_slot, u8 * value)
get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
{
*value = hotplug_slot->info->adapter_status;
return 0;
}

static int
get_latch_status(struct hotplug_slot *hotplug_slot, u8 * value)
get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
{
*value = hotplug_slot->info->latch_status;
return 0;
Expand Down Expand Up @@ -299,6 +299,7 @@ cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
error:
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_register_bus);

int
cpci_hp_unregister_bus(struct pci_bus *bus)
Expand Down Expand Up @@ -329,6 +330,7 @@ cpci_hp_unregister_bus(struct pci_bus *bus)
up_write(&list_rwsem);
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);

/* This is the interrupt mode interrupt handler */
static irqreturn_t
Expand Down Expand Up @@ -360,7 +362,7 @@ static int
init_slots(int clear_ins)
{
struct slot *slot;
struct pci_dev* dev;
struct pci_dev *dev;

dbg("%s - enter", __func__);
down_read(&list_rwsem);
Expand Down Expand Up @@ -614,6 +616,7 @@ cpci_hp_register_controller(struct cpci_hp_controller *new_controller)
controller = new_controller;
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_register_controller);

static void
cleanup_slots(void)
Expand Down Expand Up @@ -653,6 +656,7 @@ cpci_hp_unregister_controller(struct cpci_hp_controller *old_controller)
status = -ENODEV;
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);

int
cpci_hp_start(void)
Expand Down Expand Up @@ -690,6 +694,7 @@ cpci_hp_start(void)
dbg("%s - exit", __func__);
return 0;
}
EXPORT_SYMBOL_GPL(cpci_hp_start);

int
cpci_hp_stop(void)
Expand All @@ -704,6 +709,7 @@ cpci_hp_stop(void)
cpci_stop_thread();
return 0;
}
EXPORT_SYMBOL_GPL(cpci_hp_stop);

int __init
cpci_hotplug_init(int debug)
Expand All @@ -721,10 +727,3 @@ cpci_hotplug_exit(void)
cpci_hp_stop();
cpci_hp_unregister_controller(controller);
}

EXPORT_SYMBOL_GPL(cpci_hp_register_controller);
EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);
EXPORT_SYMBOL_GPL(cpci_hp_register_bus);
EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);
EXPORT_SYMBOL_GPL(cpci_hp_start);
EXPORT_SYMBOL_GPL(cpci_hp_stop);
18 changes: 9 additions & 9 deletions drivers/pci/hotplug/cpci_hotplug_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extern int cpci_debug;
#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)


u8 cpci_get_attention_status(struct slot* slot)
u8 cpci_get_attention_status(struct slot *slot)
{
int hs_cap;
u16 hs_csr;
Expand All @@ -66,7 +66,7 @@ u8 cpci_get_attention_status(struct slot* slot)
return hs_csr & 0x0008 ? 1 : 0;
}

int cpci_set_attention_status(struct slot* slot, int status)
int cpci_set_attention_status(struct slot *slot, int status)
{
int hs_cap;
u16 hs_csr;
Expand All @@ -93,7 +93,7 @@ int cpci_set_attention_status(struct slot* slot, int status)
return 1;
}

u16 cpci_get_hs_csr(struct slot* slot)
u16 cpci_get_hs_csr(struct slot *slot)
{
int hs_cap;
u16 hs_csr;
Expand All @@ -111,7 +111,7 @@ u16 cpci_get_hs_csr(struct slot* slot)
return hs_csr;
}

int cpci_check_and_clear_ins(struct slot* slot)
int cpci_check_and_clear_ins(struct slot *slot)
{
int hs_cap;
u16 hs_csr;
Expand Down Expand Up @@ -140,7 +140,7 @@ int cpci_check_and_clear_ins(struct slot* slot)
return ins;
}

int cpci_check_ext(struct slot* slot)
int cpci_check_ext(struct slot *slot)
{
int hs_cap;
u16 hs_csr;
Expand All @@ -161,7 +161,7 @@ int cpci_check_ext(struct slot* slot)
return ext;
}

int cpci_clear_ext(struct slot* slot)
int cpci_clear_ext(struct slot *slot)
{
int hs_cap;
u16 hs_csr;
Expand All @@ -187,7 +187,7 @@ int cpci_clear_ext(struct slot* slot)
return 0;
}

int cpci_led_on(struct slot* slot)
int cpci_led_on(struct slot *slot)
{
int hs_cap;
u16 hs_csr;
Expand Down Expand Up @@ -216,7 +216,7 @@ int cpci_led_on(struct slot* slot)
return 0;
}

int cpci_led_off(struct slot* slot)
int cpci_led_off(struct slot *slot)
{
int hs_cap;
u16 hs_csr;
Expand Down Expand Up @@ -303,7 +303,7 @@ int cpci_configure_slot(struct slot *slot)
return ret;
}

int cpci_unconfigure_slot(struct slot* slot)
int cpci_unconfigure_slot(struct slot *slot)
{
struct pci_dev *dev, *temp;

Expand Down
8 changes: 4 additions & 4 deletions drivers/pci/hotplug/cpcihp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ static struct cpci_hp_controller generic_hpc;

static int __init validate_parameters(void)
{
char* str;
char* p;
char *str;
char *p;
unsigned long tmp;

if(!bridge) {
Expand Down Expand Up @@ -142,8 +142,8 @@ static int query_enum(void)
static int __init cpcihp_generic_init(void)
{
int status;
struct resource* r;
struct pci_dev* dev;
struct resource *r;
struct pci_dev *dev;

info(DRIVER_DESC " version: " DRIVER_VERSION);
status = validate_parameters();
Expand Down
Loading

0 comments on commit 38a6148

Please sign in to comment.