linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] clocksource: tcb_clksrc: Fix clock speed message
@ 2017-12-01 12:22 Romain Izard
  2017-12-07 11:01 ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Romain Izard @ 2017-12-01 12:22 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Daniel Lezcano, Thomas Gleixner, linux-arm-kernel, linux-kernel,
	Romain Izard

The clock speed displayed at boot in an information message was 500 kHz
too high compared to its real value. As the value is not used anywhere,
there is no functional impact.

Fix the rounding formula to display the correct value.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
---
v2: rebase over v4.15-rc1

There is no specified maintainer for this file, only supporters.
Nicolas, could you pick this through the at91 tree as the TCB block
is an AT91 peripheral ?

 drivers/clocksource/tcb_clksrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 9de47d4d2d9e..43f4d5c4d6fa 100644
--- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c
@@ -384,7 +384,7 @@ static int __init tcb_clksrc_init(void)
 
 	printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK,
 			divided_rate / 1000000,
-			((divided_rate + 500000) % 1000000) / 1000);
+			((divided_rate % 1000000) + 500) / 1000);
 
 	if (tc->tcb_config && tc->tcb_config->counter_width == 32) {
 		/* use apropriate function to read 32 bit counter */
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] clocksource: tcb_clksrc: Fix clock speed message
  2017-12-01 12:22 [PATCH v2] clocksource: tcb_clksrc: Fix clock speed message Romain Izard
@ 2017-12-07 11:01 ` Daniel Lezcano
  2017-12-07 16:34   ` Nicolas Ferre
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Lezcano @ 2017-12-07 11:01 UTC (permalink / raw)
  To: Romain Izard, Nicolas Ferre
  Cc: Thomas Gleixner, linux-arm-kernel, linux-kernel

On 01/12/2017 13:22, Romain Izard wrote:
> The clock speed displayed at boot in an information message was 500 kHz
> too high compared to its real value. As the value is not used anywhere,
> there is no functional impact.
> 
> Fix the rounding formula to display the correct value.
> 
> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
> ---
> v2: rebase over v4.15-rc1
> 
> There is no specified maintainer for this file, only supporters.

That is not correct, it defaults to Thomas and me, the maintainers of
drivers/clocksource :)

> Nicolas, could you pick this through the at91 tree as the TCB block
> is an AT91 peripheral ?

Nicolas, do you agree with this change ? If yes, I will take it.

>  drivers/clocksource/tcb_clksrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
> index 9de47d4d2d9e..43f4d5c4d6fa 100644
> --- a/drivers/clocksource/tcb_clksrc.c
> +++ b/drivers/clocksource/tcb_clksrc.c
> @@ -384,7 +384,7 @@ static int __init tcb_clksrc_init(void)
>  
>  	printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK,
>  			divided_rate / 1000000,
> -			((divided_rate + 500000) % 1000000) / 1000);
> +			((divided_rate % 1000000) + 500) / 1000);
>  	if (tc->tcb_config && tc->tcb_config->counter_width == 32) {
>  		/* use apropriate function to read 32 bit counter */
> 


-- 
 <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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] clocksource: tcb_clksrc: Fix clock speed message
  2017-12-07 11:01 ` Daniel Lezcano
@ 2017-12-07 16:34   ` Nicolas Ferre
  2017-12-07 16:52     ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Ferre @ 2017-12-07 16:34 UTC (permalink / raw)
  To: Daniel Lezcano, Romain Izard
  Cc: Thomas Gleixner, linux-arm-kernel, linux-kernel, Alexandre Belloni

On 07/12/2017 at 12:01, Daniel Lezcano wrote:
> On 01/12/2017 13:22, Romain Izard wrote:
>> The clock speed displayed at boot in an information message was 500 kHz
>> too high compared to its real value. As the value is not used anywhere,
>> there is no functional impact.
>>
>> Fix the rounding formula to display the correct value.
>>
>> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
>> ---
>> v2: rebase over v4.15-rc1
>>
>> There is no specified maintainer for this file, only supporters.
> 
> That is not correct, it defaults to Thomas and me, the maintainers of
> drivers/clocksource :)
> 
>> Nicolas, could you pick this through the at91 tree as the TCB block
>> is an AT91 peripheral ?
> 
> Nicolas, do you agree with this change ? If yes, I will take it.

Yes, fine with me:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks Daniel for the "heads-up".

Best regards,
  Nicolas

>>  drivers/clocksource/tcb_clksrc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
>> index 9de47d4d2d9e..43f4d5c4d6fa 100644
>> --- a/drivers/clocksource/tcb_clksrc.c
>> +++ b/drivers/clocksource/tcb_clksrc.c
>> @@ -384,7 +384,7 @@ static int __init tcb_clksrc_init(void)
>>  
>>  	printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK,
>>  			divided_rate / 1000000,
>> -			((divided_rate + 500000) % 1000000) / 1000);
>> +			((divided_rate % 1000000) + 500) / 1000);
>>  	if (tc->tcb_config && tc->tcb_config->counter_width == 32) {
>>  		/* use apropriate function to read 32 bit counter */
>>
> 
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] clocksource: tcb_clksrc: Fix clock speed message
  2017-12-07 16:34   ` Nicolas Ferre
@ 2017-12-07 16:52     ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2017-12-07 16:52 UTC (permalink / raw)
  To: Nicolas Ferre, Romain Izard
  Cc: Thomas Gleixner, linux-arm-kernel, linux-kernel, Alexandre Belloni

On 07/12/2017 17:34, Nicolas Ferre wrote:
> On 07/12/2017 at 12:01, Daniel Lezcano wrote:
>> On 01/12/2017 13:22, Romain Izard wrote:
>>> The clock speed displayed at boot in an information message was 500 kHz
>>> too high compared to its real value. As the value is not used anywhere,
>>> there is no functional impact.
>>>
>>> Fix the rounding formula to display the correct value.
>>>
>>> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
>>> ---
>>> v2: rebase over v4.15-rc1
>>>
>>> There is no specified maintainer for this file, only supporters.
>>
>> That is not correct, it defaults to Thomas and me, the maintainers of
>> drivers/clocksource :)
>>
>>> Nicolas, could you pick this through the at91 tree as the TCB block
>>> is an AT91 peripheral ?
>>
>> Nicolas, do you agree with this change ? If yes, I will take it.
> 
> Yes, fine with me:
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> 
> Thanks Daniel for the "heads-up".

Thanks, applied 4.16.


-- 
 <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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-07 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 12:22 [PATCH v2] clocksource: tcb_clksrc: Fix clock speed message Romain Izard
2017-12-07 11:01 ` Daniel Lezcano
2017-12-07 16:34   ` Nicolas Ferre
2017-12-07 16:52     ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).