summaryrefslogtreecommitdiff
path: root/drivers/firewire
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-09-05 16:10:29 +0300
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-09-05 16:10:29 +0300
commit7519033f319d4dc8066cb3a37c1276610f4cb0ca (patch)
treecf87f17a46bcee57576b6d711865a62f6bd9c349 /drivers/firewire
parent5c49cc0ed405cadb60d8c4484f95ffdaf7c6ec5c (diff)
downloadlinux-7519033f319d4dc8066cb3a37c1276610f4cb0ca.tar.xz
firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps
It is enough to notify programming mistakes to programmers just once. Suggested-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240905131029.6433-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/core-iso.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
index af76fa1823f1..a249974a0f87 100644
--- a/drivers/firewire/core-iso.c
+++ b/drivers/firewire/core-iso.c
@@ -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);
@@ -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);