2021-12-12 14:32:56

by Xiang wangx

[permalink] [raw]
Subject: [PATCH] time/timekeeping: Fix syntax errors in comments

Delete the redundant word 'time'.

Signed-off-by: Xiang wangx <[email protected]>
---
kernel/time/timekeeping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index b348749a9fc6..b1fbedd35300 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1148,7 +1148,7 @@ static int adjust_historical_crosststamp(struct system_time_snapshot *history,
return ret;
}

- /* Fixup monotonic raw and real time time values */
+ /* Fixup monotonic raw and real time values */
if (interp_forward) {
ts->sys_monoraw = ktime_add_ns(history->raw, corr_raw);
ts->sys_realtime = ktime_add_ns(history->real, corr_real);
--
2.20.1



2021-12-17 22:26:56

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [PATCH] time/timekeeping: Fix syntax errors in comments

On Sun, Dec 12 2021 at 22:32, Xiang wangx wrote:
> Delete the redundant word 'time'.
>
> Signed-off-by: Xiang wangx <[email protected]>
> ---
> kernel/time/timekeeping.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index b348749a9fc6..b1fbedd35300 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -1148,7 +1148,7 @@ static int adjust_historical_crosststamp(struct system_time_snapshot *history,
> return ret;
> }
>
> - /* Fixup monotonic raw and real time time values */
> + /* Fixup monotonic raw and real time values */

It's not redundant because it talks about 'time values'. The 'time
values' which are fixed up are 'monotonic raw' and 'real time'.

So yes, the comment _is_ awkward and hard to read, but removing time
does not make it any better. Something like this;

/* Fixup the MONOTONIC_RAW and REAL_TIME time values */

Hmm?

Thanks,

tglx