public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Qing Wang <wangqing@vivo.com>
To: "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
	"Jiri Kosina" <jikos@kernel.org>,
	"Benjamin Tissoires" <benjamin.tissoires@redhat.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Alasdair Kergon" <agk@redhat.com>,
	"Mike Snitzer" <snitzer@redhat.com>,
	dm-devel@redhat.com, "Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	xen-devel@lists.xenproject.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org,
	linux-media@vger.kernel.org
Cc: Wang Qing <wangqing@vivo.com>
Subject: [PATCH V2 2/13] clk: mvebu: use time_is_before_eq_jiffies() instead of jiffies judgment
Date: Thu, 10 Feb 2022 18:30:25 -0800	[thread overview]
Message-ID: <1644546640-23283-3-git-send-email-wangqing@vivo.com> (raw)
In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com>

From: Wang Qing <wangqing@vivo.com>

It is better use time_xxx() directly instead of jiffies judgment
for understanding.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/clk/mvebu/armada-37xx-periph.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index 32ac6b6..14d73f8
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -25,6 +25,7 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
+#include <linux/jiffies.h>
 
 #define TBG_SEL		0x0
 #define DIV_SEL0	0x4
@@ -541,7 +542,7 @@ static void clk_pm_cpu_set_rate_wa(struct clk_pm_cpu *pm_cpu,
 	 * We are going to L0 with rate >= 1GHz. Check whether we have been at
 	 * L1 for long enough time. If not, go to L1 for 20ms.
 	 */
-	if (pm_cpu->l1_expiration && jiffies >= pm_cpu->l1_expiration)
+	if (pm_cpu->l1_expiration && time_is_before_eq_jiffies(pm_cpu->l1_expiration))
 		goto invalidate_l1_exp;
 
 	regmap_update_bits(base, ARMADA_37XX_NB_CPU_LOAD,
-- 
2.7.4


  parent reply	other threads:[~2022-02-11  2:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11  2:30 [PATCH V2 00/13] use time_is_xxx() instead of jiffies judgment Qing Wang
2022-02-11  2:30 ` [PATCH V2 1/13] block: xen: use time_is_before_eq_jiffies() " Qing Wang
2022-02-11  2:30 ` Qing Wang [this message]
2022-02-11  2:30 ` [PATCH V2 3/13] gpu: drm: i915: use time_is_after_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 4/13] gpu: drm: radeon: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 5/13] hid: use time_is_after_jiffies() " Qing Wang
2022-02-11 15:46   ` srinivas pandruvada
2022-02-11  2:30 ` [PATCH V2 6/13] input: serio: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 7/13] md: use time_is_before_jiffies(() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 10/13] md: use time_is_before_eq_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 9/13] media: si21xx: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 10/13] media: stv0299: " Qing Wang
2022-02-11  2:30 ` [PATCH V2 11/13] media: tda8083: use time_is_after_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 12/13] media: wl128x: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 13/13] media: vivid: use time_is_after_jiffies() " Qing Wang
2022-02-12 16:46 ` [PATCH V2 00/13] use time_is_xxx() " Theodore Ts'o
     [not found] ` <AC2AdwCTE8eh*443p3QtSarp.9.1644684463005.Hmail.wangqing@vivo.com.@PFlnZmtnMG42UnZ2SllNSmFAbWl0LmVkdT4=>
2022-02-14  1:41   ` 王擎

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=1644546640-23283-3-git-send-email-wangqing@vivo.com \
    --to=wangqing@vivo.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=agk@redhat.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=axboe@kernel.dk \
    --cc=benjamin.tissoires@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dm-devel@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jikos@kernel.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=sboyd@kernel.org \
    --cc=snitzer@redhat.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox