mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +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> |
||
---|---|---|
.. | ||
asymmetric_keys | ||
async_tx | ||
.gitignore | ||
842.c | ||
ablk_helper.c | ||
ablkcipher.c | ||
aead.c | ||
aes_generic.c | ||
af_alg.c | ||
ahash.c | ||
akcipher.c | ||
algapi.c | ||
algboss.c | ||
algif_aead.c | ||
algif_hash.c | ||
algif_rng.c | ||
algif_skcipher.c | ||
ansi_cprng.c | ||
anubis.c | ||
api.c | ||
arc4.c | ||
authenc.c | ||
authencesn.c | ||
blkcipher.c | ||
blowfish_common.c | ||
blowfish_generic.c | ||
camellia_generic.c | ||
cast5_generic.c | ||
cast6_generic.c | ||
cast_common.c | ||
cbc.c | ||
ccm.c | ||
chacha20_generic.c | ||
chacha20poly1305.c | ||
cipher.c | ||
cmac.c | ||
compress.c | ||
crc32_generic.c | ||
crc32c_generic.c | ||
crct10dif_common.c | ||
crct10dif_generic.c | ||
cryptd.c | ||
crypto_engine.c | ||
crypto_null.c | ||
crypto_user.c | ||
crypto_wq.c | ||
ctr.c | ||
cts.c | ||
deflate.c | ||
des_generic.c | ||
dh.c | ||
dh_helper.c | ||
drbg.c | ||
ecb.c | ||
ecc.c | ||
ecc.h | ||
ecc_curve_defs.h | ||
ecdh.c | ||
ecdh_helper.c | ||
echainiv.c | ||
fcrypt.c | ||
fips.c | ||
gcm.c | ||
gf128mul.c | ||
ghash-generic.c | ||
hash_info.c | ||
hmac.c | ||
internal.h | ||
jitterentropy-kcapi.c | ||
jitterentropy.c | ||
Kconfig | ||
keywrap.c | ||
khazad.c | ||
kpp.c | ||
lrw.c | ||
lz4.c | ||
lz4hc.c | ||
lzo.c | ||
Makefile | ||
mcryptd.c | ||
md4.c | ||
md5.c | ||
memneq.c | ||
michael_mic.c | ||
pcbc.c | ||
pcrypt.c | ||
poly1305_generic.c | ||
proc.c | ||
ripemd.h | ||
rmd128.c | ||
rmd160.c | ||
rmd256.c | ||
rmd320.c | ||
rng.c | ||
rsa-pkcs1pad.c | ||
rsa.c | ||
rsa_helper.c | ||
rsaprivkey.asn1 | ||
rsapubkey.asn1 | ||
salsa20_generic.c | ||
scatterwalk.c | ||
seed.c | ||
seqiv.c | ||
serpent_generic.c | ||
sha1_generic.c | ||
sha3_generic.c | ||
sha256_generic.c | ||
sha512_generic.c | ||
shash.c | ||
skcipher.c | ||
tcrypt.c | ||
tcrypt.h | ||
tea.c | ||
testmgr.c | ||
testmgr.h | ||
tgr192.c | ||
twofish_common.c | ||
twofish_generic.c | ||
vmac.c | ||
wp512.c | ||
xcbc.c | ||
xor.c | ||
xts.c |