* [PATCH] firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps
@ 2024-09-05 13:10 Takashi Sakamoto
2024-09-06 15:42 ` Takashi Sakamoto
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Sakamoto @ 2024-09-05 13:10 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel, Takashi Iwai
It is enough to notify programming mistakes to programmers just once.
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
drivers/firewire/core-iso.c | 4 ++--
1 file 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);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps
2024-09-05 13:10 [PATCH] firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps Takashi Sakamoto
@ 2024-09-06 15:42 ` Takashi Sakamoto
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Sakamoto @ 2024-09-06 15:42 UTC (permalink / raw)
To: linux1394-devel; +Cc: Takashi Iwai, linux-kernel
On Thu, Sep 05, 2024 at 10:10:29PM +0900, Takashi Sakamoto wrote:
> It is enough to notify programming mistakes to programmers just once.
>
> Suggested-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
> drivers/firewire/core-iso.c | 4 ++--
> 1 file 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);
Applied to for-next branch.
Regards
Takashi Sakamoto
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-06 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05 13:10 [PATCH] firewire: core: use WARN_ON_ONCE() to avoid superfluous dumps Takashi Sakamoto
2024-09-06 15:42 ` Takashi Sakamoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.