All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>,
	mm-commits@vger.kernel.org, sboyd@kernel.org,
	john.stultz@linaro.org, wangqing@vivo.com,
	akpm@linux-foundation.org
Subject: Re: + timekeeping-use-time_is_before_jiffies-instead-of-open-coding-it.patch added to -mm tree
Date: Mon, 25 Apr 2022 14:39:20 +0200	[thread overview]
Message-ID: <87v8ux1gnb.ffs@tglx> (raw)
In-Reply-To: <20220422203732.C76E7C385A0@smtp.kernel.org>

On Fri, Apr 22 2022 at 13:37, Andrew Morton wrote:
> From: Wang Qing <wangqing@vivo.com>
> Subject: timekeeping: use time_is_before_jiffies() instead of open coding it
>
> Use the helper function time_is_{before,after}_jiffies() to improve code
> readability.
>
> Link: https://lkml.kernel.org/r/1650621172-66967-10-git-send-email-wangqing@vivo.com
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>  kernel/time/timekeeping.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- a/kernel/time/timekeeping.c~timekeeping-use-time_is_before_jiffies-instead-of-open-coding-it
> +++ a/kernel/time/timekeeping.c
> @@ -216,7 +216,7 @@ static void timekeeping_check_update(str
>  	}
>  
>  	if (tk->underflow_seen) {
> -		if (jiffies - tk->last_warning > WARNING_FREQ) {
> +		if (time_is_before_jiffies(tk->last_warning + WARNING_FREQ)) {

I have a hard time to see how this improves anything. The least thing it
improves is readability.

Yeah, I know some script told so....

Thanks,

        tglx



      reply	other threads:[~2022-04-25 12:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 20:37 + timekeeping-use-time_is_before_jiffies-instead-of-open-coding-it.patch added to -mm tree Andrew Morton
2022-04-25 12:39 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8ux1gnb.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=wangqing@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.