Commit 7519033f authored by Takashi Sakamoto's avatar Takashi Sakamoto

firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps

It is enough to notify programming mistakes to programmers just once.
Suggested-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240905131029.6433-1-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
parent 5c49cc0e
...@@ -220,7 +220,7 @@ int fw_iso_context_flush_completions(struct fw_iso_context *ctx) ...@@ -220,7 +220,7 @@ int fw_iso_context_flush_completions(struct fw_iso_context *ctx)
might_sleep(); might_sleep();
// Avoid dead lock due to programming mistake. // Avoid dead lock due to programming mistake.
if (WARN_ON(current_work() == &ctx->work)) if (WARN_ON_ONCE(current_work() == &ctx->work))
return 0; return 0;
disable_work_sync(&ctx->work); disable_work_sync(&ctx->work);
...@@ -244,7 +244,7 @@ int fw_iso_context_stop(struct fw_iso_context *ctx) ...@@ -244,7 +244,7 @@ int fw_iso_context_stop(struct fw_iso_context *ctx)
might_sleep(); might_sleep();
// Avoid dead lock due to programming mistake. // Avoid dead lock due to programming mistake.
if (WARN_ON(current_work() == &ctx->work)) if (WARN_ON_ONCE(current_work() == &ctx->work))
return 0; return 0;
err = ctx->card->driver->stop_iso(ctx); err = ctx->card->driver->stop_iso(ctx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment