Skip to content

Commit 885f123

Browse files
virtuosogregkh
authored andcommitted
intel_th: msu: Fix the unexpected state warning
The unexpected state warning should only warn on illegal state transitions. Fix that. Signed-off-by: Alexander Shishkin <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Fixes: 615c164 ("intel_th: msu: Introduce buffer interface") Cc: [email protected] # v5.4+ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 283f87c commit 885f123

File tree

1 file changed

+4
-3
lines changed
  • drivers/hwtracing/intel_th

1 file changed

+4
-3
lines changed

drivers/hwtracing/intel_th/msu.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,6 @@ static int msc_win_set_lockout(struct msc_window *win,
718718

719719
if (old != expect) {
720720
ret = -EINVAL;
721-
dev_warn_ratelimited(msc_dev(win->msc),
722-
"expected lockout state %d, got %d\n",
723-
expect, old);
724721
goto unlock;
725722
}
726723

@@ -741,6 +738,10 @@ static int msc_win_set_lockout(struct msc_window *win,
741738
/* from intel_th_msc_window_unlock(), don't warn if not locked */
742739
if (expect == WIN_LOCKED && old == new)
743740
return 0;
741+
742+
dev_warn_ratelimited(msc_dev(win->msc),
743+
"expected lockout state %d, got %d\n",
744+
expect, old);
744745
}
745746

746747
return ret;

0 commit comments

Comments
 (0)