Skip to content
Commit e2dfa1d5 authored by Zhen Lei's avatar Zhen Lei Committed by Greg Kroah-Hartman
Browse files

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: default avatarZhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20230726062508.950-1-thunder.leizhen@huaweicloud.com
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f429378a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment