linux/arch
Petr Mladek 3989144f86 kthread: kthread worker API cleanup
A good practice is to prefix the names of functions by the name
of the subsystem.

The kthread worker API is a mix of classic kthreads and workqueues.  Each
worker has a dedicated kthread.  It runs a generic function that process
queued works.  It is implemented as part of the kthread subsystem.

This patch renames the existing kthread worker API to use
the corresponding name from the workqueues API prefixed by
kthread_:

__init_kthread_worker()		-> __kthread_init_worker()
init_kthread_worker()		-> kthread_init_worker()
init_kthread_work()		-> kthread_init_work()
insert_kthread_work()		-> kthread_insert_work()
queue_kthread_work()		-> kthread_queue_work()
flush_kthread_work()		-> kthread_flush_work()
flush_kthread_worker()		-> kthread_flush_worker()

Note that the names of DEFINE_KTHREAD_WORK*() macros stay
as they are. It is common that the "DEFINE_" prefix has
precedence over the subsystem names.

Note that INIT() macros and init() functions use different
naming scheme. There is no good solution. There are several
reasons for this solution:

  + "init" in the function names stands for the verb "initialize"
    aka "initialize worker". While "INIT" in the macro names
    stands for the noun "INITIALIZER" aka "worker initializer".

  + INIT() macros are used only in DEFINE() macros

  + init() functions are used close to the other kthread()
    functions. It looks much better if all the functions
    use the same scheme.

  + There will be also kthread_destroy_worker() that will
    be used close to kthread_cancel_work(). It is related
    to the init() function. Again it looks better if all
    functions use the same naming scheme.

  + there are several precedents for such init() function
    names, e.g. amd_iommu_init_device(), free_area_init_node(),
    jump_label_init_type(),  regmap_init_mmio_clk(),

  + It is not an argument but it was inconsistent even before.

[arnd@arndb.de: fix linux-next merge conflict]
 Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de
Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.com
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-11 15:06:33 -07:00
..
alpha Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-10 11:01:51 -07:00
arc nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
arm ARM: use simpler API for random address requests 2016-10-11 15:06:32 -07:00
arm64 arm64: use simpler API for random address requests 2016-10-11 15:06:32 -07:00
avr32 Merge branch 'akpm' (patches from Andrew) 2016-10-07 21:38:00 -07:00
blackfin nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
c6x nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
cris CRIS changes for 4.9 2016-10-10 11:28:35 -07:00
frv nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
h8300 nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
hexagon nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
ia64 nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
m32r nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
m68k nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
metag nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
microblaze nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
mips mips/panic: replace smp_send_stop() with kdump friendly version in panic path 2016-10-11 15:06:32 -07:00
mn10300 nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
nios2 nios2 update for v4.9-rc1 2016-10-10 11:31:19 -07:00
openrisc nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
parisc Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 13:04:49 -07:00
powerpc powerpc: implement the DMA_ATTR_NO_WARN attribute 2016-10-11 15:06:32 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 20:16:43 -07:00
score nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
sh nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
sparc nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
tile tile: use simpler API for random address requests 2016-10-11 15:06:32 -07:00
um nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
unicore32 unicore32: use simpler API for random address requests 2016-10-11 15:06:32 -07:00
x86 kthread: kthread worker API cleanup 2016-10-11 15:06:33 -07:00
xtensa Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-10 11:01:51 -07:00
.gitignore
Kconfig Merge branch 'linus' into x86/asm, to pick up recent fixes 2016-09-15 08:24:53 +02:00