Message ID | 20190909154600.19917-7-fbarrat@linux.ibm.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | opencapi: enable card reset and link retraining | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch next (c317052c95bef1f977b023158e5aa929215f443d) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 17 lines checked |
On Mon, 2019-09-09 at 17:45 +0200, Frederic Barrat wrote: > 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. > > Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> > --- > 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 6758fd7c382e..5b5cbf1e636d 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); > } > } Reviewed-by: Alastair D'Silva <alastair@d-silva.org>
On 10/9/19 1:45 am, Frederic Barrat wrote: > 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. > > Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 6758fd7c382e..5b5cbf1e636d 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); } }
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. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> --- drivers/pci/hotplug/pnv_php.c | 6 ------ 1 file changed, 6 deletions(-)