Skip to content

Commit

Permalink
firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps
Browse files Browse the repository at this point in the history
It is enough to notify programming mistakes to programmers just once.

Suggested-by: Takashi Iwai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>
  • Loading branch information
takaswie committed Sep 5, 2024
1 parent 5c49cc0 commit 7519033
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/firewire/core-iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int fw_iso_context_flush_completions(struct fw_iso_context *ctx)
might_sleep();

// Avoid dead lock due to programming mistake.
if (WARN_ON(current_work() == &ctx->work))
if (WARN_ON_ONCE(current_work() == &ctx->work))
return 0;

disable_work_sync(&ctx->work);
Expand All @@ -244,7 +244,7 @@ int fw_iso_context_stop(struct fw_iso_context *ctx)
might_sleep();

// Avoid dead lock due to programming mistake.
if (WARN_ON(current_work() == &ctx->work))
if (WARN_ON_ONCE(current_work() == &ctx->work))
return 0;

err = ctx->card->driver->stop_iso(ctx);
Expand Down

0 comments on commit 7519033

Please sign in to comment.