workqueue: Replace deprecated ida_simple_*() with ida_alloc()/ida_free()
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 4 Aug 2021 03:50:36 +0000 (11:50 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 9 Aug 2021 22:32:38 +0000 (12:32 -1000)
commite441b56fe438fd126b9eea7d30c57d3cd3f34e14
tree2fdfb38b7bfc4dbada4e4429e199b46335002d93
parent67dc8325370844ffce92aa59abe8b453aa6aa83c
workqueue: Replace deprecated ida_simple_*() with ida_alloc()/ida_free()

Replace ida_simple_get() with ida_alloc() and ida_simple_remove() with
ida_free(), the latter is more concise and intuitive.

In addition, if ida_alloc() fails, NULL is returned directly. This
eliminates unnecessary initialization of two local variables and an 'if'
judgment.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c