From: Tejun Heo <tj@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v3] workqueue: Wrap flush_workqueue() using a macro
Date: Mon, 23 May 2022 09:04:16 -1000 [thread overview]
Message-ID: <YovasFyOcKB6ZanQ@slm.duckdns.org> (raw)
In-Reply-To: <e9df5f75-2958-db1b-462d-dba4a0455f44@I-love.SAKURA.ne.jp>
On Sat, May 21, 2022 at 08:37:19PM +0900, Tetsuo Handa wrote:
> +/*
> + * Detect attempt to flush system-wide workqueues at compile time when possible.
> + *
> + * Always warn, for there is no in-tree flush_workqueue(system_*_wq) user.
> + */
> +#define flush_workqueue(wq) \
> +do { \
> + if ((__builtin_constant_p(&(wq) == &system_wq) && \
> + &(wq) == &system_wq) || \
> + (__builtin_constant_p(&(wq) == &system_highpri_wq) && \
> + &(wq) == &system_highpri_wq) || \
> + (__builtin_constant_p(&(wq) == &system_long_wq) && \
> + &(wq) == &system_long_wq) || \
> + (__builtin_constant_p(&(wq) == &system_unbound_wq) && \
> + &(wq) == &system_unbound_wq) || \
> + (__builtin_constant_p(&(wq) == &system_freezable_wq) && \
> + &(wq) == &system_freezable_wq) || \
> + (__builtin_constant_p(&(wq) == &system_power_efficient_wq) && \
> + &(wq) == &system_power_efficient_wq) || \
> + (__builtin_constant_p(&(wq) == &system_freezable_power_efficient_wq) && \
> + &(wq) == &system_freezable_power_efficient_wq)) \
> + __warn_flushing_systemwide_wq(); \
> + flush_workqueue(wq); \
> +} while (0)
Please just rename the backend function.
Thanks.
--
tejun
next prev parent reply other threads:[~2022-05-23 19:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 23:31 [PATCH] checkpatch: warn about flushing system-wide workqueues Tetsuo Handa
2022-04-24 23:45 ` Joe Perches
2022-04-25 0:33 ` Tetsuo Handa
2022-05-05 13:42 ` Tetsuo Handa
2022-05-05 15:48 ` Joe Perches
2022-05-05 17:32 ` Tejun Heo
2022-05-05 23:29 ` Tetsuo Handa
2022-05-12 16:46 ` Tejun Heo
2022-05-16 1:32 ` [PATCH v2] workqueue: Wrap flush_workqueue() using a macro Tetsuo Handa
2022-05-16 5:00 ` [PATCH v3] " Tetsuo Handa
2022-05-16 7:18 ` Joe Perches
2022-05-16 8:34 ` Rasmus Villemoes
2022-05-20 8:01 ` Tejun Heo
2022-05-20 9:51 ` Tetsuo Handa
2022-05-20 11:11 ` Tejun Heo
2022-05-20 11:43 ` Tetsuo Handa
2022-05-20 17:10 ` Tejun Heo
2022-05-21 1:14 ` Tetsuo Handa
2022-05-21 4:57 ` Tejun Heo
2022-05-21 11:37 ` Tetsuo Handa
2022-05-23 19:04 ` Tejun Heo [this message]
2022-05-24 10:51 ` Tetsuo Handa
2022-05-27 6:21 ` [PATCH v4] workqueue: Wrap flush_workqueue() using an inline function Tetsuo Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YovasFyOcKB6ZanQ@slm.duckdns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox