pci/hotplug/pnv-php: Remove erroneous warning
authorFrederic Barrat <fbarrat@linux.ibm.com>
Thu, 21 Nov 2019 13:49:13 +0000 (14:49 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Jan 2020 10:31:17 +0000 (21:31 +1100)
On powernv, when removing a device through hotplug, the following
warning is logged:

     Invalid refcount <.> on <...>

It may be incorrect, the refcount may be set to a higher value than 1
and be valid. of_detach_node() can drop more than one reference. As it
doesn't seem trivial to assert the correct value, let's remove the
warning.

Reviewed-by: Alastair D'Silva <alastair@d-silva.org>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191121134918.7155-7-fbarrat@linux.ibm.com
drivers/pci/hotplug/pnv_php.c

index d7b2b47..6037983 100644 (file)
@@ -151,17 +151,11 @@ static void pnv_php_rmv_pdns(struct device_node *dn)
 static void pnv_php_detach_device_nodes(struct device_node *parent)
 {
        struct device_node *dn;
-       int refcount;
 
        for_each_child_of_node(parent, dn) {
                pnv_php_detach_device_nodes(dn);
 
                of_node_put(dn);
-               refcount = kref_read(&dn->kobj.kref);
-               if (refcount != 1)
-                       pr_warn("Invalid refcount %d on <%pOF>\n",
-                               refcount, dn);
-
                of_detach_node(dn);
        }
 }