]> git.baikalelectronics.ru Git - kernel.git/commit
linux/kthread.h: remove unused macros
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 22 Mar 2022 21:38:33 +0000 (14:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2022 22:57:00 +0000 (15:57 -0700)
commitc9af6bd3d42dab73d125955bc850c91c311f40eb
tree734dfce1b57189da65bfe26267983169cb0a2c87
parent8240d0a52581b69b665312c50df5f36af06ef06e
linux/kthread.h: remove unused macros

Ever since these macros were introduced in commit 55d23b277def
("kthread: implement kthread_worker"), there has been precisely one user
(commit 4f11642d56e0, "NVMe: Async IO queue deletion"), and that user
went away in 2016 with 5215bcc0b872 ("NVMe: IO queue deletion
re-write").

Apart from being unused, these macros are also awkward to use (which may
contribute to them not being used): Having a way to statically (or
on-stack) allocating the storage for the struct kthread_worker itself
doesn't help much, since obviously one needs to have some code for
actually _spawning_ the worker thread, which must have error checking.
And these days we have the kthread_create_worker() interface which both
allocates the struct kthread_worker and spawns the kthread.

Link: https://lkml.kernel.org/r/20220314145343.494694-1-linux@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Yafang Shao <laoar.shao@gmail.com>
Cc: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kthread.h