Re: [PATCH 2/9] sched: treewide: use is_kthread()
From: Geert Uytterhoeven
Date: Wed Aug 14 2019 - 07:27:58 EST
Hi Mark,
On Wed, Aug 14, 2019 at 12:43 PM Mark Rutland <mark.rutland@xxxxxxx> wrote:
> Now that we have is_kthread(), let's convert existing open-coded checks
> of the form:
>
> task->flags & PF_KTHREAD
>
> ... over to the new helper, which makes things a little easier to read,
> and sets a consistent example for new code to follow.
>
> Generated with coccinelle:
>
> ----
> virtual patch
>
> @ depends on patch @
> expression E;
> @@
>
> - (E->flags & PF_KTHREAD)
> + is_kthread(E)
> ----
>
> ... though this didn't pick up the instance in <linux/cgroup.h>, which I
> fixed up manually.
>
> Instances checking multiple PF_* flags at ocne are left as-is for now.
>
> There should be no functional change as a result of this patch.
>
> Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
> arch/m68k/kernel/process.c | 2 +-
Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds