debugobjects: add missing empty function debug_object_active_state()
PATCH 1/1 debugobjects: add missing empty function debug_object_active_state()
All other functions are defined for when CONFIG_DEBUG_OBJECTS is not set.
--- include/linux/debugobjects.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/debugobjects.h +3 -0
@@ -99,6 +99,9 @@ static inline void debug_object_free (void *addr, const struct debug_obj_descr *descr) { }static inline void debug_object_assert_init (void *addr,const struct debug_obj_descr *descr) { } +static inline void +debug_object_active_state (void *addr,const struct debug_obj_descr *descr, +unsigned int expect,unsigned int next) { }static inline void debug_objects_early_init (void ) { }static inline void debug_objects_mem_init (void ) { }
Signature · 1 line
2.20.1
Quoting Xin He (2021-06-17 00:10:27)
Quoted 13 lines
All other functions are defined for when
CONFIG_DEBUG_OBJECTSis not set.Signed-off-by Xin He <[email protected]>--- include/linux/debugobjects.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/debugobjects.h +0
-0
include/linux/debugobjects.h static inline void · line 104
Quoted 6 lines
include/linux/debugobjects.h +3
-0@@ -99,6 +99,9 @@ static inline void debug_object_free (void *addr, const struct debug_obj_descr *descr) { }static inline void debug_object_assert_init (void *addr,const struct debug_obj_descr *descr) { } +static inline void +debug_object_active_state (void *addr,const struct debug_obj_descr *descr, +unsigned int expect,unsigned int next) { }
I suppose it's a landmine that may go off at some point, but this isn't fixing anything that's broken at the moment, correct?
Quoted 3 lines
include/linux/debugobjects.h +0
-0static inline void debug_objects_early_init (void ) { }static inline void debug_objects_mem_init (void ) { }
Quoted 9 lines · Stephen Boyd
Quoting Xin He (2021-06-17 00:10:27)
Quoted 8 lines
All other functions are defined for when
CONFIG_DEBUG_OBJECTSis not set.Signed-off-by Xin He <[email protected]>--- include/linux/debugobjects.h | 3 +++ 1 file changed, 3 insertions(+)
Quoted 14 lines
include/linux/debugobjects.h static inline void · line 104
Quoted 11 lines
include/linux/debugobjects.h +3
-0@@ -99,6 +99,9 @@ static inline void debug_object_free (void *addr, const struct debug_obj_descr *descr) { }static inline void debug_object_assert_init (void *addr,const struct debug_obj_descr *descr) { } +static inline void +debug_object_active_state (void *addr,const struct debug_obj_descr *descr, +unsigned int expect,unsigned int next) { }I suppose it's a landmine that may go off at some point, but this isn't fixing anything that's broken at the moment, correct?
The two users (RCU/i915) have it guarded with RCU/I915 specific config options which depend on CONFIG_DEBUG_OBJECTS.
I have no problem with the patch per se, but it want's a proper use case.
Thanks,
tglx
Quoted 26 lines · Thomas Gleixner <[email protected]> 于2021年6月20日周日 上午12:47写道:
Quoted 9 lines · Stephen Boyd
Quoting Xin He (2021-06-17 00:10:27)
Quoted 8 lines
All other functions are defined for when
CONFIG_DEBUG_OBJECTSis not set.Signed-off-by Xin He <[email protected]>--- include/linux/debugobjects.h | 3 +++ 1 file changed, 3 insertions(+)Quoted 14 lines
include/linux/debugobjects.h static inline void · line 104
Quoted 11 lines
include/linux/debugobjects.h +3
-0@@ -99,6 +99,9 @@ static inline void debug_object_free (void *addr, const struct debug_obj_descr *descr) { }static inline void debug_object_assert_init (void *addr,const struct debug_obj_descr *descr) { } +static inline void +debug_object_active_state (void *addr,const struct debug_obj_descr *descr, +unsigned int expect,unsigned int next) { }I suppose it's a landmine that may go off at some point, but this isn't fixing anything that's broken at the moment, correct?
Quoted 11 lines
The two users (RCU/i915) have it guarded with RCU/I915 specific config options which depend on
CONFIG_DEBUG_OBJECTS.I have no problem with the patch per se, but it want's a proper use case.
Thanks,
tglx
Yes, config options ensure that there will be no problems. But when CONFIG_DEBUG_OBJECTS is not set, we should provide all empty functions that may be used.
Thanks.
Quoted 7 lines · 何鑫
Quoted 2 lines · Thomas Gleixner <[email protected]> 于2021年6月20日周日 上午12:47写道:
I have no problem with the patch per se, but it want's a proper use case.
Yes, config options ensure that there will be no problems. But when
CONFIG_DEBUG_OBJECTSis not set, we should provide all empty functions that may be used.
What for? Just that we have them w/o users? If someone needs it w/o guards then we still can add it.
What's the actual problem you are trying to solve?
Thanks,
tglx
Quoted 10 lines · Stephen Boyd <[email protected]> 于2021年6月19日周六 下午1:03写道:
Quoting Xin He (2021-06-17 00:10:27)
Quoted 8 lines
All other functions are defined for when
CONFIG_DEBUG_OBJECTSis not set.Signed-off-by Xin He <[email protected]>--- include/linux/debugobjects.h | 3 +++ 1 file changed, 3 insertions(+)
Quoted 14 lines
include/linux/debugobjects.h static inline void · line 104
Quoted 11 lines
include/linux/debugobjects.h +3
-0@@ -99,6 +99,9 @@ static inline void debug_object_free (void *addr, const struct debug_obj_descr *descr) { }static inline void debug_object_assert_init (void *addr,const struct debug_obj_descr *descr) { } +static inline void +debug_object_active_state (void *addr,const struct debug_obj_descr *descr, +unsigned int expect,unsigned int next) { }I suppose it's a landmine that may go off at some point, but this isn't fixing anything that's broken at the moment, correct?
Yes, you are rigth.
Thanks.
Quoted 4 lines
Quoted 4 lines
include/linux/debugobjects.h +0
-0static inline void debug_objects_early_init (void ) { }static inline void debug_objects_mem_init (void ) { }