diff options
author | 2023-07-26 14:25:08 +0800 | |
---|---|---|
committer | 2023-08-05 08:31:41 +0200 | |
commit | e2dfa1d5223cdfa7b832a582de0b7504eaf7ae22 (patch) | |
tree | 38da1624732c3ea890f7910cc0d8fe3e49e8ddb7 /drivers/base/node.c | |
parent | driver core: Call dma_cleanup() on the test_remove path (diff) | |
download | linux-rng-e2dfa1d5223cdfa7b832a582de0b7504eaf7ae22.tar.xz linux-rng-e2dfa1d5223cdfa7b832a582de0b7504eaf7ae22.zip |
kobject: Add helper kobj_ns_type_is_valid()
There are too many "(type > KOBJ_NS_TYPE_NONE) && (type < KOBJ_NS_TYPES)"
and "(type <= KOBJ_NS_TYPE_NONE) || (type >= KOBJ_NS_TYPES)", add helper
kobj_ns_type_is_valid() to eliminate duplicate code and improve
readability.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20230726062508.950-1-thunder.leizhen@huaweicloud.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/node.c')
0 files changed, 0 insertions, 0 deletions