]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
s390/pci: provide more debug information
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Wed, 21 Jun 2017 10:30:40 +0000 (12:30 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 28 Jun 2017 05:32:14 +0000 (07:32 +0200)
Add some debug data to observe the lifetime of the
architecture specific device information.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci.c
arch/s390/pci/pci_clp.c

index 114b390d80f95bd2320a1b45bbcf49cc07dee3e5..d5c7444a0c05faff72cbcc42b01f2e14be50ccff 100644 (file)
@@ -772,6 +772,7 @@ void pcibios_remove_bus(struct pci_bus *bus)
        list_del(&zdev->entry);
        spin_unlock(&zpci_list_lock);
 
+       zpci_dbg(3, "rem fid:%x\n", zdev->fid);
        kfree(zdev);
 }
 
index 3a5cd84e5a3b365d2968e331adb125164f1ffaa6..bd534b4d40e3f3a5db21db39f1f1d20e714d7bd5 100644 (file)
@@ -193,12 +193,12 @@ out:
 int clp_add_pci_device(u32 fid, u32 fh, int configured)
 {
        struct zpci_dev *zdev;
-       int rc;
+       int rc = -ENOMEM;
 
        zpci_dbg(3, "add fid:%x, fh:%x, c:%d\n", fid, fh, configured);
        zdev = kzalloc(sizeof(*zdev), GFP_KERNEL);
        if (!zdev)
-               return -ENOMEM;
+               goto error;
 
        zdev->fh = fh;
        zdev->fid = fid;
@@ -219,6 +219,7 @@ int clp_add_pci_device(u32 fid, u32 fh, int configured)
        return 0;
 
 error:
+       zpci_dbg(0, "add fid:%x, rc:%d\n", fid, rc);
        kfree(zdev);
        return rc;
 }