Re: [PATCH] checkpatch: warn about flushing system-wide workqueues

From: Tetsuo Handa
Date: Sun Apr 24 2022 - 20:33:57 EST


On 2022/04/25 8:45, Joe Perches wrote:
> And it's probably more readable using separate lines and it looks as
> if the 3rd test is unnecessary as it could be combined with the 2nd.
>
> if ($line =~ /\bflush_scheduled_work\s*\(/ ||
> $line =~ /\bflush_workqueue\s*\(\s*system(_\w*)?_wq\s*\)/) {

We don't need to worry about possibility like

flush_workqueue(system_module1_wq);

? Then, we can simplify like you suggested.