diff mbox series

[2/3] clocksource/drivers/timer-ti-dm: Remove extra of_node_put()

Message ID 20210304072135.52712-3-tony@atomide.com
State New
Headers show
Series Fixes for timer-ti-dm systimer posted mode | expand

Commit Message

Tony Lindgren March 4, 2021, 7:21 a.m. UTC
We have of_translate_address() already do of_node_put() as needed.
I probably looked at __of_translate_address() earlier by accident
that of_translate_address() uses.

Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support")
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/clocksource/timer-ti-dm-systimer.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Grygorii Strashko March 4, 2021, 8:55 p.m. UTC | #1
On 04/03/2021 09:21, Tony Lindgren wrote:
> We have of_translate_address() already do of_node_put() as needed.
> I probably looked at __of_translate_address() earlier by accident
> that of_translate_address() uses.

I do not see of_node_put() in of_translate_address() and
  __of_translate_address() is doing of_node_get(dev);
?

> 
> Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support")
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>   drivers/clocksource/timer-ti-dm-systimer.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
> --- a/drivers/clocksource/timer-ti-dm-systimer.c
> +++ b/drivers/clocksource/timer-ti-dm-systimer.c
> @@ -265,7 +265,6 @@ static void __init dmtimer_systimer_assign_alwon(void)
>   				    pa == 0x48318000)
>   					continue;
>   
> -				of_node_put(np);
>   				break;
>   			}
>   		}
> @@ -300,7 +299,6 @@ static u32 __init dmtimer_systimer_find_first_available(void)
>   				continue;
>   			}
>   
> -			of_node_put(np);
>   			break;
>   		}
>   	}
>
Tony Lindgren March 5, 2021, 7:49 a.m. UTC | #2
* Grygorii Strashko <grygorii.strashko@ti.com> [210304 20:56]:
> 

> 

> On 04/03/2021 09:21, Tony Lindgren wrote:

> > We have of_translate_address() already do of_node_put() as needed.

> > I probably looked at __of_translate_address() earlier by accident

> > that of_translate_address() uses.

> 

> I do not see of_node_put() in of_translate_address() and

>  __of_translate_address() is doing of_node_get(dev);

> ?


Oh right.. this is confusing.. Yeah we can ignore this patch.
We should have the use count set for only the system timer(s)
we claim.

Regards,

Tony
Tony Lindgren March 8, 2021, 3:26 p.m. UTC | #3
Hi,

* Tony Lindgren <tony@atomide.com> [210305 07:58]:
> * Grygorii Strashko <grygorii.strashko@ti.com> [210304 20:56]:

> > 

> > 

> > On 04/03/2021 09:21, Tony Lindgren wrote:

> > > We have of_translate_address() already do of_node_put() as needed.

> > > I probably looked at __of_translate_address() earlier by accident

> > > that of_translate_address() uses.

> > 

> > I do not see of_node_put() in of_translate_address() and

> >  __of_translate_address() is doing of_node_get(dev);

> > ?

> 

> Oh right.. this is confusing.. Yeah we can ignore this patch.

> We should have the use count set for only the system timer(s)

> we claim.


Daniel, would you like me to repost this series with this patch dropped?

Regards,

Tony
Daniel Lezcano March 20, 2021, 10:13 p.m. UTC | #4
On 08/03/2021 16:26, Tony Lindgren wrote:
> Hi,

> 

> * Tony Lindgren <tony@atomide.com> [210305 07:58]:

>> * Grygorii Strashko <grygorii.strashko@ti.com> [210304 20:56]:

>>>

>>>

>>> On 04/03/2021 09:21, Tony Lindgren wrote:

>>>> We have of_translate_address() already do of_node_put() as needed.

>>>> I probably looked at __of_translate_address() earlier by accident

>>>> that of_translate_address() uses.

>>>

>>> I do not see of_node_put() in of_translate_address() and

>>>  __of_translate_address() is doing of_node_get(dev);

>>> ?

>>

>> Oh right.. this is confusing.. Yeah we can ignore this patch.

>> We should have the use count set for only the system timer(s)

>> we claim.

> 

> Daniel, would you like me to repost this series with this patch dropped?


No, it is ok. I will take care of not picking it.

Thanks
  -- Daniel



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
diff mbox series

Patch

diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
--- a/drivers/clocksource/timer-ti-dm-systimer.c
+++ b/drivers/clocksource/timer-ti-dm-systimer.c
@@ -265,7 +265,6 @@  static void __init dmtimer_systimer_assign_alwon(void)
 				    pa == 0x48318000)
 					continue;
 
-				of_node_put(np);
 				break;
 			}
 		}
@@ -300,7 +299,6 @@  static u32 __init dmtimer_systimer_find_first_available(void)
 				continue;
 			}
 
-			of_node_put(np);
 			break;
 		}
 	}