mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 16:11:38 +00:00
3989144f86
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> |
||
---|---|---|
.. | ||
8250 | ||
cpm_uart | ||
jsm | ||
21285.c | ||
altera_jtaguart.c | ||
altera_uart.c | ||
amba-pl010.c | ||
amba-pl011.c | ||
amba-pl011.h | ||
apbuart.c | ||
apbuart.h | ||
ar933x_uart.c | ||
arc_uart.c | ||
atmel_serial.c | ||
bcm63xx_uart.c | ||
bfin_sport_uart.c | ||
bfin_sport_uart.h | ||
bfin_uart.c | ||
clps711x.c | ||
crisv10.c | ||
crisv10.h | ||
digicolor-usart.c | ||
dz.c | ||
dz.h | ||
earlycon-arm-semihost.c | ||
earlycon.c | ||
efm32-uart.c | ||
etraxfs-uart.c | ||
fsl_lpuart.c | ||
icom.c | ||
icom.h | ||
ifx6x60.c | ||
ifx6x60.h | ||
imx.c | ||
ioc3_serial.c | ||
ioc4_serial.c | ||
ip22zilog.c | ||
ip22zilog.h | ||
Kconfig | ||
kgdb_nmi.c | ||
kgdboc.c | ||
lantiq.c | ||
lpc32xx_hs.c | ||
m32r_sio_reg.h | ||
m32r_sio.c | ||
Makefile | ||
max310x.c | ||
max3100.c | ||
mcf.c | ||
men_z135_uart.c | ||
meson_uart.c | ||
mpc52xx_uart.c | ||
mps2-uart.c | ||
mpsc.c | ||
msm_serial.c | ||
mux.c | ||
mvebu-uart.c | ||
mxs-auart.c | ||
netx-serial.c | ||
omap-serial.c | ||
pch_uart.c | ||
pic32_uart.c | ||
pic32_uart.h | ||
pmac_zilog.c | ||
pmac_zilog.h | ||
pnx8xxx_uart.c | ||
pxa.c | ||
rp2.c | ||
sa1100.c | ||
samsung.c | ||
samsung.h | ||
sb1250-duart.c | ||
sc16is7xx.c | ||
sccnxp.c | ||
serial_core.c | ||
serial_ks8695.c | ||
serial_mctrl_gpio.c | ||
serial_mctrl_gpio.h | ||
serial_txx9.c | ||
serial-tegra.c | ||
sh-sci.c | ||
sh-sci.h | ||
sirfsoc_uart.c | ||
sirfsoc_uart.h | ||
sn_console.c | ||
sprd_serial.c | ||
st-asc.c | ||
stm32-usart.c | ||
stm32-usart.h | ||
suncore.c | ||
sunhv.c | ||
sunsab.c | ||
sunsab.h | ||
sunsu.c | ||
sunzilog.c | ||
sunzilog.h | ||
tilegx.c | ||
timbuart.c | ||
timbuart.h | ||
uartlite.c | ||
ucc_uart.c | ||
vr41xx_siu.c | ||
vt8500_serial.c | ||
xilinx_uartps.c | ||
zs.c | ||
zs.h |