Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v2 0/5] kthread: convert remaining users to kthread_create_worker
@ 2026-09-04  9:37 Bradley Morgan
  2026-09-04  9:37 ` [PATCH v2 1/5] media: ivtv: convert to kthread_run_worker Bradley Morgan
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Bradley Morgan @ 2026-09-04  9:37 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tejun Heo, Frederic Weisbecker, Peter Zijlstra, Waiman Long,
	Christian Brauner, Kees Cook, Andy Walls, Mauro Carvalho Chehab,
	Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Greg Kroah-Hartman, Jiri Slaby, Rafael J . Wysocki,
	Viresh Kumar, Ingo Molnar, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Bradley Morgan, linux-media, netdev, linux-serial,
	linux-pm

kthread_worker_fn() has carried a FIXME for a decade: it assigns
worker->task = current because the old kthread_run(kthread_worker_fn)
callers never told the worker what task it was. The new
kthread_create_worker*() API sets worker->task before the worker
starts, so the self assignment is dead code.

This series converts the four remaining users of the old pattern
(ivtv, encx24j600, sc16is7xx, cpufreq_schedutil) to the new API,
then removes the self assignment from kthread_worker_fn() while
keeping a WARN_ON() as a sanity check for any out-of-tree users.

v1 -> v2:
- Keep WARN_ON() as a bare sanity check (Frederic, Peter)
- Add comment explaining why the WARN_ON() is there
- Fix subject and changelog wording

Bradley Morgan (5):
  media: ivtv: convert to kthread_run_worker
  net: encx24j600: convert to kthread_run_worker
  tty: sc16is7xx: convert to kthread_run_worker
  cpufreq: schedutil: convert to kthread_create_worker
  kthread: remove worker->task self assignment

 drivers/media/pci/ivtv/ivtv-driver.c        | 14 ++++----
 drivers/media/pci/ivtv/ivtv-driver.h        |  3 +-
 drivers/net/ethernet/microchip/encx24j600.c | 20 +++++------
 drivers/tty/serial/sc16is7xx.c              | 39 ++++++++++-----------
 kernel/kthread.c                            |  8 ++---
 kernel/sched/cpufreq_schedutil.c            | 33 ++++++++---------
 6 files changed, 50 insertions(+), 67 deletions(-)

-- 
2.47.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-09-04 15:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04  9:37 [PATCH v2 0/5] kthread: convert remaining users to kthread_create_worker Bradley Morgan
2026-09-04  9:37 ` [PATCH v2 1/5] media: ivtv: convert to kthread_run_worker Bradley Morgan
2026-09-04 10:44   ` Bradley Morgan
2026-09-04  9:40 ` [PATCH v2 2/5] net: encx24j600: " Bradley Morgan
2026-09-04  9:40 ` [PATCH v2 3/5] tty: sc16is7xx: " Bradley Morgan
2026-09-04  9:40 ` [PATCH v2 4/5] cpufreq: schedutil: convert to kthread_create_worker Bradley Morgan
2026-09-04  9:40 ` [PATCH v2 5/5] kthread: remove worker->task self assignment Bradley Morgan
2026-09-04 15:54 ` [PATCH v2 0/5] kthread: convert remaining users to kthread_create_worker Jakub Kicinski
2026-09-04 15:56   ` Bradley Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox