From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
stable@vger.kernel.org
Subject: [GIT PULL 2/6] stm class: sys-t: Fix the use of time_after()
Date: Tue, 17 Mar 2020 08:22:11 +0200 [thread overview]
Message-ID: <20200317062215.15598-3-alexander.shishkin@linux.intel.com> (raw)
In-Reply-To: <20200317062215.15598-1-alexander.shishkin@linux.intel.com>
The operands of time_after() are in a wrong order in both instances in
the sys-t driver. Fix that.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 39f10239df75 ("stm class: p_sys-t: Add support for CLOCKSYNC packets")
Fixes: d69d5e83110f ("stm class: Add MIPI SyS-T protocol support")
Cc: stable@vger.kernel.org # v4.20+
---
drivers/hwtracing/stm/p_sys-t.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwtracing/stm/p_sys-t.c b/drivers/hwtracing/stm/p_sys-t.c
index b178a5495b67..360b5c03df95 100644
--- a/drivers/hwtracing/stm/p_sys-t.c
+++ b/drivers/hwtracing/stm/p_sys-t.c
@@ -238,7 +238,7 @@ static struct configfs_attribute *sys_t_policy_attrs[] = {
static inline bool sys_t_need_ts(struct sys_t_output *op)
{
if (op->node.ts_interval &&
- time_after(op->ts_jiffies + op->node.ts_interval, jiffies)) {
+ time_after(jiffies, op->ts_jiffies + op->node.ts_interval)) {
op->ts_jiffies = jiffies;
return true;
@@ -250,8 +250,8 @@ static inline bool sys_t_need_ts(struct sys_t_output *op)
static bool sys_t_need_clock_sync(struct sys_t_output *op)
{
if (op->node.clocksync_interval &&
- time_after(op->clocksync_jiffies + op->node.clocksync_interval,
- jiffies)) {
+ time_after(jiffies,
+ op->clocksync_jiffies + op->node.clocksync_interval)) {
op->clocksync_jiffies = jiffies;
return true;
--
2.25.1
next prev parent reply other threads:[~2020-03-17 6:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 6:22 [GIT PULL 0/6] intel_th/stm class: Updates for v5.7 Alexander Shishkin
2020-03-17 6:22 ` [GIT PULL 1/6] intel_th: Disallow multi mode on devices where it's broken Alexander Shishkin
2020-03-17 6:22 ` Alexander Shishkin [this message]
2020-03-18 10:28 ` [GIT PULL 2/6] stm class: sys-t: Fix the use of time_after() Greg Kroah-Hartman
2020-03-17 6:22 ` [GIT PULL 3/6] intel_th: msu: Make stopping the trace optional Alexander Shishkin
2020-03-18 10:30 ` Greg Kroah-Hartman
2020-03-17 6:22 ` [GIT PULL 4/6] intel_th: msu: Fix the unexpected state warning Alexander Shishkin
2020-03-18 10:30 ` Greg Kroah-Hartman
2020-03-17 6:22 ` [GIT PULL 5/6] intel_th: Fix user-visible error codes Alexander Shishkin
2020-03-18 10:31 ` Greg Kroah-Hartman
2020-03-17 6:22 ` [GIT PULL 6/6] intel_th: pci: Add Elkhart Lake CPU support Alexander Shishkin
2020-03-17 22:30 ` Sasha Levin
2020-03-18 10:31 ` Greg Kroah-Hartman
2020-03-18 10:26 ` [GIT PULL 0/6] intel_th/stm class: Updates for v5.7 Greg Kroah-Hartman
2020-03-19 8:51 ` [PATCH v1] intel_th: msu: Make stopping the trace optional Alexander Shishkin
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=20200317062215.15598-3-alexander.shishkin@linux.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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
Powered by JetHome