device property: Fix documentation for fwnode_get_next_parent()

Message ID 20221207112219.2652411-1-linmq006@gmail.com
State New
Headers
Series device property: Fix documentation for fwnode_get_next_parent() |

Commit Message

Miaoqian Lin Dec. 7, 2022, 11:22 a.m. UTC
  Use fwnode_handle_put() on the node pointer to release the refcount.
Change fwnode_handle_node() to fwnode_handle_put().

Fixes: 233872585de1 ("device property: Add fwnode_get_next_parent()")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/base/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Andy Shevchenko Dec. 7, 2022, 11:32 a.m. UTC | #1
On Wed, Dec 07, 2022 at 03:22:18PM +0400, Miaoqian Lin wrote:
> Use fwnode_handle_put() on the node pointer to release the refcount.
> Change fwnode_handle_node() to fwnode_handle_put().

Looks correct to me, thanks!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Fixes: 233872585de1 ("device property: Add fwnode_get_next_parent()")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
>  drivers/base/property.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 2a5a37fcd998..daa1e379762b 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -601,7 +601,7 @@ EXPORT_SYMBOL_GPL(fwnode_get_parent);
>   * node's parents.
>   *
>   * Returns a node pointer with refcount incremented, use
> - * fwnode_handle_node() on it when done.
> + * fwnode_handle_put() on it when done.
>   */
>  struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode)
>  {
> -- 
> 2.25.1
>
  
Daniel Scally Dec. 7, 2022, 11:37 a.m. UTC | #2
On 07/12/2022 11:32, Andy Shevchenko wrote:
> On Wed, Dec 07, 2022 at 03:22:18PM +0400, Miaoqian Lin wrote:
>> Use fwnode_handle_put() on the node pointer to release the refcount.
>> Change fwnode_handle_node() to fwnode_handle_put().
> Looks correct to me, thanks!
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>


And to me too:


Reviewed-by: Daniel Scally <djrscally@gmail.com>

>
>> Fixes: 233872585de1 ("device property: Add fwnode_get_next_parent()")
>> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
>> ---
>>  drivers/base/property.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/property.c b/drivers/base/property.c
>> index 2a5a37fcd998..daa1e379762b 100644
>> --- a/drivers/base/property.c
>> +++ b/drivers/base/property.c
>> @@ -601,7 +601,7 @@ EXPORT_SYMBOL_GPL(fwnode_get_parent);
>>   * node's parents.
>>   *
>>   * Returns a node pointer with refcount incremented, use
>> - * fwnode_handle_node() on it when done.
>> + * fwnode_handle_put() on it when done.
>>   */
>>  struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode)
>>  {
>> -- 
>> 2.25.1
>>
  
Sakari Ailus Dec. 7, 2022, 12:21 p.m. UTC | #3
On Wed, Dec 07, 2022 at 03:22:18PM +0400, Miaoqian Lin wrote:
> Use fwnode_handle_put() on the node pointer to release the refcount.
> Change fwnode_handle_node() to fwnode_handle_put().
> 
> Fixes: 233872585de1 ("device property: Add fwnode_get_next_parent()")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>

Thanks!

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

> ---
>  drivers/base/property.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 2a5a37fcd998..daa1e379762b 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -601,7 +601,7 @@ EXPORT_SYMBOL_GPL(fwnode_get_parent);
>   * node's parents.
>   *
>   * Returns a node pointer with refcount incremented, use
> - * fwnode_handle_node() on it when done.
> + * fwnode_handle_put() on it when done.
>   */
>  struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode)
>  {
  
Rafael J. Wysocki Dec. 7, 2022, 2:30 p.m. UTC | #4
On Wed, Dec 7, 2022 at 1:21 PM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> On Wed, Dec 07, 2022 at 03:22:18PM +0400, Miaoqian Lin wrote:
> > Use fwnode_handle_put() on the node pointer to release the refcount.
> > Change fwnode_handle_node() to fwnode_handle_put().
> >
> > Fixes: 233872585de1 ("device property: Add fwnode_get_next_parent()")
> > Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
>
> Thanks!
>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

So I'm assuming that Greg will pick up this one or please let me know otherwise.

> > ---
> >  drivers/base/property.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/property.c b/drivers/base/property.c
> > index 2a5a37fcd998..daa1e379762b 100644
> > --- a/drivers/base/property.c
> > +++ b/drivers/base/property.c
> > @@ -601,7 +601,7 @@ EXPORT_SYMBOL_GPL(fwnode_get_parent);
> >   * node's parents.
> >   *
> >   * Returns a node pointer with refcount incremented, use
> > - * fwnode_handle_node() on it when done.
> > + * fwnode_handle_put() on it when done.
> >   */
> >  struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode)
> >  {
>
> --
  
Greg KH Dec. 7, 2022, 4:21 p.m. UTC | #5
On Wed, Dec 07, 2022 at 03:30:43PM +0100, Rafael J. Wysocki wrote:
> On Wed, Dec 7, 2022 at 1:21 PM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> >
> > On Wed, Dec 07, 2022 at 03:22:18PM +0400, Miaoqian Lin wrote:
> > > Use fwnode_handle_put() on the node pointer to release the refcount.
> > > Change fwnode_handle_node() to fwnode_handle_put().
> > >
> > > Fixes: 233872585de1 ("device property: Add fwnode_get_next_parent()")
> > > Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> >
> > Thanks!
> >
> > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> 
> So I'm assuming that Greg will pick up this one or please let me know otherwise.

I'll grab it now, thanks.

greg k-h
  

Patch

diff --git a/drivers/base/property.c b/drivers/base/property.c
index 2a5a37fcd998..daa1e379762b 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -601,7 +601,7 @@  EXPORT_SYMBOL_GPL(fwnode_get_parent);
  * node's parents.
  *
  * Returns a node pointer with refcount incremented, use
- * fwnode_handle_node() on it when done.
+ * fwnode_handle_put() on it when done.
  */
 struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode)
 {