Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: John Keller <jpk@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

Tony Luck 34ef30ca 8ee4dc39

+19 -19
+1 -1
arch/ia64/sn/kernel/io_common.c
··· 364 364 365 365 element = kzalloc(sizeof(struct sysdata_el), GFP_KERNEL); 366 366 if (!element) { 367 - dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__); 367 + dev_dbg(&dev->dev, "%s: out of memory!\n", __FUNCTION__); 368 368 return; 369 369 } 370 370 element->sysdata = SN_PCIDEV_INFO(dev);
+18 -18
drivers/pci/hotplug/sgi_hotplug.c
··· 249 249 250 250 251 251 if (rc == PCI_SLOT_ALREADY_UP) { 252 - dev_dbg(slot->pci_bus->self, "is already active\n"); 252 + dev_dbg(&slot->pci_bus->self->dev, "is already active\n"); 253 253 return 1; /* return 1 to user */ 254 254 } 255 255 256 256 if (rc == PCI_L1_ERR) { 257 - dev_dbg(slot->pci_bus->self, 257 + dev_dbg(&slot->pci_bus->self->dev, 258 258 "L1 failure %d with message: %s", 259 259 resp.resp_sub_errno, resp.resp_l1_msg); 260 260 return -EPERM; 261 261 } 262 262 263 263 if (rc) { 264 - dev_dbg(slot->pci_bus->self, 264 + dev_dbg(&slot->pci_bus->self->dev, 265 265 "insert failed with error %d sub-error %d\n", 266 266 rc, resp.resp_sub_errno); 267 267 return -EIO; ··· 287 287 288 288 if ((action == PCI_REQ_SLOT_ELIGIBLE) && 289 289 (rc == PCI_SLOT_ALREADY_DOWN)) { 290 - dev_dbg(slot->pci_bus->self, "Slot %s already inactive\n"); 290 + dev_dbg(&slot->pci_bus->self->dev, "Slot %s already inactive\n", slot->physical_path); 291 291 return 1; /* return 1 to user */ 292 292 } 293 293 294 294 if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_EMPTY_33MHZ)) { 295 - dev_dbg(slot->pci_bus->self, 295 + dev_dbg(&slot->pci_bus->self->dev, 296 296 "Cannot remove last 33MHz card\n"); 297 297 return -EPERM; 298 298 } 299 299 300 300 if ((action == PCI_REQ_SLOT_ELIGIBLE) && (rc == PCI_L1_ERR)) { 301 - dev_dbg(slot->pci_bus->self, 301 + dev_dbg(&slot->pci_bus->self->dev, 302 302 "L1 failure %d with message \n%s\n", 303 303 resp.resp_sub_errno, resp.resp_l1_msg); 304 304 return -EPERM; 305 305 } 306 306 307 307 if ((action == PCI_REQ_SLOT_ELIGIBLE) && rc) { 308 - dev_dbg(slot->pci_bus->self, 308 + dev_dbg(&slot->pci_bus->self->dev, 309 309 "remove failed with error %d sub-error %d\n", 310 310 rc, resp.resp_sub_errno); 311 311 return -EIO; ··· 317 317 if ((action == PCI_REQ_SLOT_DISABLE) && !rc) { 318 318 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); 319 319 pcibus_info->pbi_enabled_devices &= ~(1 << device_num); 320 - dev_dbg(slot->pci_bus->self, "remove successful\n"); 320 + dev_dbg(&slot->pci_bus->self->dev, "remove successful\n"); 321 321 return 0; 322 322 } 323 323 324 324 if ((action == PCI_REQ_SLOT_DISABLE) && rc) { 325 - dev_dbg(slot->pci_bus->self,"remove failed rc = %d\n", rc); 325 + dev_dbg(&slot->pci_bus->self->dev,"remove failed rc = %d\n", rc); 326 326 } 327 327 328 328 return rc; ··· 375 375 num_funcs = pci_scan_slot(slot->pci_bus, 376 376 PCI_DEVFN(slot->device_num + 1, 0)); 377 377 if (!num_funcs) { 378 - dev_dbg(slot->pci_bus->self, "no device in slot\n"); 378 + dev_dbg(&slot->pci_bus->self->dev, "no device in slot\n"); 379 379 mutex_unlock(&sn_hotplug_mutex); 380 380 return -ENODEV; 381 381 } ··· 427 427 phandle = PCI_CONTROLLER(slot->pci_bus)->acpi_handle; 428 428 429 429 if (acpi_bus_get_device(phandle, &pdevice)) { 430 - dev_dbg(slot->pci_bus->self, 430 + dev_dbg(&slot->pci_bus->self->dev, 431 431 "no parent device, assuming NULL\n"); 432 432 pdevice = NULL; 433 433 } ··· 479 479 mutex_unlock(&sn_hotplug_mutex); 480 480 481 481 if (rc == 0) 482 - dev_dbg(slot->pci_bus->self, 482 + dev_dbg(&slot->pci_bus->self->dev, 483 483 "insert operation successful\n"); 484 484 else 485 - dev_dbg(slot->pci_bus->self, 485 + dev_dbg(&slot->pci_bus->self->dev, 486 486 "insert operation failed rc = %d\n", rc); 487 487 488 488 return rc; ··· 659 659 if (rc) 660 660 goto register_err; 661 661 } 662 - dev_dbg(pci_bus->self, "Registered bus with hotplug\n"); 662 + dev_dbg(&pci_bus->self->dev, "Registered bus with hotplug\n"); 663 663 return rc; 664 664 665 665 register_err: 666 - dev_dbg(pci_bus->self, "bus failed to register with err = %d\n", 666 + dev_dbg(&pci_bus->self->dev, "bus failed to register with err = %d\n", 667 667 rc); 668 668 669 669 alloc_err: 670 670 if (rc == -ENOMEM) 671 - dev_dbg(pci_bus->self, "Memory allocation error\n"); 671 + dev_dbg(&pci_bus->self->dev, "Memory allocation error\n"); 672 672 673 673 /* destroy THIS element */ 674 674 if (bss_hotplug_slot) ··· 701 701 702 702 rc = sn_pci_bus_valid(pci_bus); 703 703 if (rc != 1) { 704 - dev_dbg(pci_bus->self, "not a valid hotplug bus\n"); 704 + dev_dbg(&pci_bus->self->dev, "not a valid hotplug bus\n"); 705 705 continue; 706 706 } 707 - dev_dbg(pci_bus->self, "valid hotplug bus\n"); 707 + dev_dbg(&pci_bus->self->dev, "valid hotplug bus\n"); 708 708 709 709 rc = sn_hotplug_slot_register(pci_bus); 710 710 if (!rc) {