Skip to content

Commit 283f87c

Browse files
virtuosogregkh
authored andcommitted
stm class: sys-t: Fix the use of time_after()
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 <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Fixes: 39f1023 ("stm class: p_sys-t: Add support for CLOCKSYNC packets") Fixes: d69d5e8 ("stm class: Add MIPI SyS-T protocol support") Cc: [email protected] # v4.20+ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f17f06a commit 283f87c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hwtracing/stm/p_sys-t.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static struct configfs_attribute *sys_t_policy_attrs[] = {
238238
static inline bool sys_t_need_ts(struct sys_t_output *op)
239239
{
240240
if (op->node.ts_interval &&
241-
time_after(op->ts_jiffies + op->node.ts_interval, jiffies)) {
241+
time_after(jiffies, op->ts_jiffies + op->node.ts_interval)) {
242242
op->ts_jiffies = jiffies;
243243

244244
return true;
@@ -250,8 +250,8 @@ static inline bool sys_t_need_ts(struct sys_t_output *op)
250250
static bool sys_t_need_clock_sync(struct sys_t_output *op)
251251
{
252252
if (op->node.clocksync_interval &&
253-
time_after(op->clocksync_jiffies + op->node.clocksync_interval,
254-
jiffies)) {
253+
time_after(jiffies,
254+
op->clocksync_jiffies + op->node.clocksync_interval)) {
255255
op->clocksync_jiffies = jiffies;
256256

257257
return true;

0 commit comments

Comments
 (0)