Commit 34ef30ca authored by Tony Luck's avatar Tony Luck

[IA64] Fix warnings resulting from type-checking in dev_dbg()

Lots of places where we passed a "struct pci_device *" rather than
a "struct device *".  One place where we used a "%s" in the format,
but forgot to provide an argument.
Acked-by: default avatarJohn Keller <jpk@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 8ee4dc39
...@@ -364,7 +364,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev) ...@@ -364,7 +364,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
element = kzalloc(sizeof(struct sysdata_el), GFP_KERNEL); element = kzalloc(sizeof(struct sysdata_el), GFP_KERNEL);
if (!element) { if (!element) {
dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__); dev_dbg(&dev->dev, "%s: out of memory!\n", __FUNCTION__);
return; return;
} }
element->sysdata = SN_PCIDEV_INFO(dev); element->sysdata = SN_PCIDEV_INFO(dev);
......
...@@ -249,19 +249,19 @@ static int sn_slot_enable(struct hotplug_slot *bss_hotplug_slot, ...@@ -249,19 +249,19 @@ static int sn_slot_enable(struct hotplug_slot *bss_hotplug_slot,
if (rc == PCI_SLOT_ALREADY_UP) { if (rc == PCI_SLOT_ALREADY_UP) {
dev_dbg(slot->pci_bus->self, "is already active\n"); dev_dbg(&slot->pci_bus->self->dev, "is already active\n");
return 1; /* return 1 to user */ return 1; /* return 1 to user */
} }
if (rc == PCI_L1_ERR) { if (rc == PCI_L1_ERR) {
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"L1 failure %d with message: %s", "L1 failure %d with message: %s",
resp.resp_sub_errno, resp.resp_l1_msg); resp.resp_sub_errno, resp.resp_l1_msg);
return -EPERM; return -EPERM;
} }
if (rc) { if (rc) {
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"insert failed with error %d sub-error %d\n", "insert failed with error %d sub-error %d\n",
rc, resp.resp_sub_errno); rc, resp.resp_sub_errno);
return -EIO; return -EIO;
...@@ -287,25 +287,25 @@ static int sn_slot_disable(struct hotplug_slot *bss_hotplug_slot, ...@@ -287,25 +287,25 @@ static int sn_slot_disable(struct hotplug_slot *bss_hotplug_slot,
if ((action == PCI_REQ_SLOT_ELIGIBLE) && if ((action == PCI_REQ_SLOT_ELIGIBLE) &&
(rc == PCI_SLOT_ALREADY_DOWN)) { (rc == PCI_SLOT_ALREADY_DOWN)) {
dev_dbg(slot->pci_bus->self, "Slot %s already inactive\n"); dev_dbg(&slot->pci_bus->self->dev, "Slot %s already inactive\n", slot->physical_path);
return 1; /* return 1 to user */ return 1; /* return 1 to user */
} }
if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_EMPTY_33MHZ)) { if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_EMPTY_33MHZ)) {
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"Cannot remove last 33MHz card\n"); "Cannot remove last 33MHz card\n");
return -EPERM; return -EPERM;
} }
if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_L1_ERR)) { if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_L1_ERR)) {
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"L1 failure %d with message \n%s\n", "L1 failure %d with message \n%s\n",
resp.resp_sub_errno, resp.resp_l1_msg); resp.resp_sub_errno, resp.resp_l1_msg);
return -EPERM; return -EPERM;
} }
if ((action == PCI_REQ_SLOT_ELIGIBLE) && rc) { if ((action == PCI_REQ_SLOT_ELIGIBLE) && rc) {
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"remove failed with error %d sub-error %d\n", "remove failed with error %d sub-error %d\n",
rc, resp.resp_sub_errno); rc, resp.resp_sub_errno);
return -EIO; return -EIO;
...@@ -317,12 +317,12 @@ static int sn_slot_disable(struct hotplug_slot *bss_hotplug_slot, ...@@ -317,12 +317,12 @@ static int sn_slot_disable(struct hotplug_slot *bss_hotplug_slot,
if ((action == PCI_REQ_SLOT_DISABLE) && !rc) { if ((action == PCI_REQ_SLOT_DISABLE) && !rc) {
pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus);
pcibus_info->pbi_enabled_devices &= ~(1 << device_num); pcibus_info->pbi_enabled_devices &= ~(1 << device_num);
dev_dbg(slot->pci_bus->self, "remove successful\n"); dev_dbg(&slot->pci_bus->self->dev, "remove successful\n");
return 0; return 0;
} }
if ((action == PCI_REQ_SLOT_DISABLE) && rc) { if ((action == PCI_REQ_SLOT_DISABLE) && rc) {
dev_dbg(slot->pci_bus->self,"remove failed rc = %d\n", rc); dev_dbg(&slot->pci_bus->self->dev,"remove failed rc = %d\n", rc);
} }
return rc; return rc;
...@@ -375,7 +375,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) ...@@ -375,7 +375,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
num_funcs = pci_scan_slot(slot->pci_bus, num_funcs = pci_scan_slot(slot->pci_bus,
PCI_DEVFN(slot->device_num + 1, 0)); PCI_DEVFN(slot->device_num + 1, 0));
if (!num_funcs) { if (!num_funcs) {
dev_dbg(slot->pci_bus->self, "no device in slot\n"); dev_dbg(&slot->pci_bus->self->dev, "no device in slot\n");
mutex_unlock(&sn_hotplug_mutex); mutex_unlock(&sn_hotplug_mutex);
return -ENODEV; return -ENODEV;
} }
...@@ -427,7 +427,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) ...@@ -427,7 +427,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle; phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle;
if (acpi_bus_get_device(phandle, &pdevice)) { if (acpi_bus_get_device(phandle, &pdevice)) {
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"no parent device, assuming NULL\n"); "no parent device, assuming NULL\n");
pdevice = NULL; pdevice = NULL;
} }
...@@ -479,10 +479,10 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) ...@@ -479,10 +479,10 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
mutex_unlock(&sn_hotplug_mutex); mutex_unlock(&sn_hotplug_mutex);
if (rc == 0) if (rc == 0)
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"insert operation successful\n"); "insert operation successful\n");
else else
dev_dbg(slot->pci_bus->self, dev_dbg(&slot->pci_bus->self->dev,
"insert operation failed rc = %d\n", rc); "insert operation failed rc = %d\n", rc);
return rc; return rc;
...@@ -659,16 +659,16 @@ static int sn_hotplug_slot_register(struct pci_bus *pci_bus) ...@@ -659,16 +659,16 @@ static int sn_hotplug_slot_register(struct pci_bus *pci_bus)
if (rc) if (rc)
goto register_err; goto register_err;
} }
dev_dbg(pci_bus->self, "Registered bus with hotplug\n"); dev_dbg(&pci_bus->self->dev, "Registered bus with hotplug\n");
return rc; return rc;
register_err: register_err:
dev_dbg(pci_bus->self, "bus failed to register with err = %d\n", dev_dbg(&pci_bus->self->dev, "bus failed to register with err = %d\n",
rc); rc);
alloc_err: alloc_err:
if (rc == -ENOMEM) if (rc == -ENOMEM)
dev_dbg(pci_bus->self, "Memory allocation error\n"); dev_dbg(&pci_bus->self->dev, "Memory allocation error\n");
/* destroy THIS element */ /* destroy THIS element */
if (bss_hotplug_slot) if (bss_hotplug_slot)
...@@ -701,10 +701,10 @@ static int sn_pci_hotplug_init(void) ...@@ -701,10 +701,10 @@ static int sn_pci_hotplug_init(void)
rc = sn_pci_bus_valid(pci_bus); rc = sn_pci_bus_valid(pci_bus);
if (rc != 1) { if (rc != 1) {
dev_dbg(pci_bus->self, "not a valid hotplug bus\n"); dev_dbg(&pci_bus->self->dev, "not a valid hotplug bus\n");
continue; continue;
} }
dev_dbg(pci_bus->self, "valid hotplug bus\n"); dev_dbg(&pci_bus->self->dev, "valid hotplug bus\n");
rc = sn_hotplug_slot_register(pci_bus); rc = sn_hotplug_slot_register(pci_bus);
if (!rc) { if (!rc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment