All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: fix some comments typo in clocksource.c
@ 2014-01-02  8:56 Yijing Wang
  2014-01-22 21:05 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Yijing Wang @ 2014-01-02  8:56 UTC (permalink / raw)
  To: John Stultz, Thomas Gleixner; +Cc: linux-kernel, Yijing Wang, Hanjun Guo

Fix some trivial comments typo in kernel/time/clocksource.c

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
 kernel/time/clocksource.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index ba3e502..9951575 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -779,8 +779,6 @@ EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale);
  * @scale:	Scale factor multiplied against freq to get clocksource hz
  * @freq:	clocksource frequency (cycles per second) divided by scale
  *
- * Returns -EBUSY if registration fails, zero otherwise.
- *
  * This *SHOULD NOT* be called directly! Please use the
  * clocksource_register_hz() or clocksource_register_khz helper functions.
  */
@@ -805,7 +803,6 @@ EXPORT_SYMBOL_GPL(__clocksource_register_scale);
  * clocksource_register - Used to install new clocksources
  * @cs:		clocksource to be registered
  *
- * Returns -EBUSY if registration fails, zero otherwise.
  */
 int clocksource_register(struct clocksource *cs)
 {
-- 
1.7.1



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

* Re: [PATCH] clocksource: fix some comments typo in clocksource.c
  2014-01-02  8:56 [PATCH] clocksource: fix some comments typo in clocksource.c Yijing Wang
@ 2014-01-22 21:05 ` Thomas Gleixner
  2014-01-23  1:15   ` Yijing Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2014-01-22 21:05 UTC (permalink / raw)
  To: Yijing Wang; +Cc: John Stultz, linux-kernel, Hanjun Guo

On Thu, 2 Jan 2014, Yijing Wang wrote:

> Fix some trivial comments typo in kernel/time/clocksource.c

That's not a typo. Thats a left over. The function simply cannot fail
anymore. So the subject of that patch should be something like:

clocksource: Remove outdated comments

And the changelog should explain, that the functions always return 0,
so the comment is just pointless. A nice follow up on that would be to
actually make the function void instead of returning a pointless int,
but that requires to check all call sites.

Thanks,

	tglx
 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> ---
>  kernel/time/clocksource.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index ba3e502..9951575 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -779,8 +779,6 @@ EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale);
>   * @scale:	Scale factor multiplied against freq to get clocksource hz
>   * @freq:	clocksource frequency (cycles per second) divided by scale
>   *
> - * Returns -EBUSY if registration fails, zero otherwise.
> - *
>   * This *SHOULD NOT* be called directly! Please use the
>   * clocksource_register_hz() or clocksource_register_khz helper functions.
>   */
> @@ -805,7 +803,6 @@ EXPORT_SYMBOL_GPL(__clocksource_register_scale);
>   * clocksource_register - Used to install new clocksources
>   * @cs:		clocksource to be registered
>   *
> - * Returns -EBUSY if registration fails, zero otherwise.
>   */
>  int clocksource_register(struct clocksource *cs)
>  {
> -- 
> 1.7.1
> 
> 
> 

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

* Re: [PATCH] clocksource: fix some comments typo in clocksource.c
  2014-01-22 21:05 ` Thomas Gleixner
@ 2014-01-23  1:15   ` Yijing Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Yijing Wang @ 2014-01-23  1:15 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: John Stultz, linux-kernel, Hanjun Guo

On 2014/1/23 5:05, Thomas Gleixner wrote:
> On Thu, 2 Jan 2014, Yijing Wang wrote:
> 
>> Fix some trivial comments typo in kernel/time/clocksource.c
> 
> That's not a typo. Thats a left over. The function simply cannot fail
> anymore. So the subject of that patch should be something like:
> 
> clocksource: Remove outdated comments

Hi Thomas, sorry for my poor English, I will update this patch title and changelog.

> 
> And the changelog should explain, that the functions always return 0,
> so the comment is just pointless. A nice follow up on that would be to
> actually make the function void instead of returning a pointless int,
> but that requires to check all call sites.

You are right, it's pointless to return 0, I will try to change the function type to void
in a separate patch, thanks!

>  
>> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>> ---
>>  kernel/time/clocksource.c |    3 ---
>>  1 files changed, 0 insertions(+), 3 deletions(-)
>>
>> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
>> index ba3e502..9951575 100644
>> --- a/kernel/time/clocksource.c
>> +++ b/kernel/time/clocksource.c
>> @@ -779,8 +779,6 @@ EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale);
>>   * @scale:	Scale factor multiplied against freq to get clocksource hz
>>   * @freq:	clocksource frequency (cycles per second) divided by scale
>>   *
>> - * Returns -EBUSY if registration fails, zero otherwise.
>> - *
>>   * This *SHOULD NOT* be called directly! Please use the
>>   * clocksource_register_hz() or clocksource_register_khz helper functions.
>>   */
>> @@ -805,7 +803,6 @@ EXPORT_SYMBOL_GPL(__clocksource_register_scale);
>>   * clocksource_register - Used to install new clocksources
>>   * @cs:		clocksource to be registered
>>   *
>> - * Returns -EBUSY if registration fails, zero otherwise.
>>   */
>>  int clocksource_register(struct clocksource *cs)
>>  {
>> -- 
>> 1.7.1
>>
>>
>>
> 
> 


-- 
Thanks!
Yijing


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

end of thread, other threads:[~2014-01-23  1:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-02  8:56 [PATCH] clocksource: fix some comments typo in clocksource.c Yijing Wang
2014-01-22 21:05 ` Thomas Gleixner
2014-01-23  1:15   ` Yijing Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.