Thread (19 messages) 19 messages, 3 authors, 2020-01-29
STALE2327d LANDED: 2 (0M)
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 06/11] pci/hotplug/pnv-php: Remove erroneous warning

From: Frederic Barrat <hidden>
Date: 2019-11-21 14:01:23
Subsystem: linux for powerpc (32-bit and 64-bit), pci subsystem, the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Bjorn Helgaas, Linus Torvalds

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 <redacted>
Reviewed-by: Andrew Donnellan <redacted>
Signed-off-by: Frederic Barrat <redacted>
---
Changelog:
v2: no change


 drivers/pci/hotplug/pnv_php.c | 6 ------
 1 file changed, 6 deletions(-)
diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c
index d7b2b47bc33e..6037983c6e46 100644
--- a/drivers/pci/hotplug/pnv_php.c
+++ b/drivers/pci/hotplug/pnv_php.c
@@ -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);
 	}
 }
-- 
2.21.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help