Skip to contentSkip to conversation

include: linux: debug_locks: Remove duplicate declaration

PATCH Superseded Wan Jiabing 2 participants 3 messages Mar 25, 2021

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include: linux: debug_locks: Remove duplicate declaration

struct task_struct is declared at 9th line. Remove the duplicate.

---
 include/linux/debug_locks.h | 1 -
 1 file changed, 1 deletion(-)
include/linux/debug_locks.h +0 -1
index 2915f56ad421..0b3187a5290d 100644
@@ -46,7 +46,6 @@ extern int debug_locks_off(void);
 # define locking_selftest()	do { } while (0)
 #endif
 
-struct task_struct;
 
 #ifdef CONFIG_LOCKDEP
 extern void debug_show_all_locks(void);
Signature · 1 line
2.25.1
#1 lore raw
Quoted 1 line · Wan Jiabing

struct task_struct is declared at 9th line. Remove the duplicate.

It seems the duplicate is the other one and you removed wrong one.

Quoted 20 lines
---
 include/linux/debug_locks.h | 1 -
 1 file changed, 1 deletion(-)
include/linux/debug_locks.h +0 -1
index 2915f56ad421..0b3187a5290d 100644
@@ -46,7 +46,6 @@ extern int debug_locks_off(void);
 # define locking_selftest()	do { } while (0)
 #endif
 
-struct task_struct;
 
 #ifdef CONFIG_LOCKDEP
 extern void debug_show_all_locks(void);
Signature · 1 line
2.25.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 4 lines · Andy Shevchenko
Quoted 1 line · Wan Jiabing

struct task_struct is declared at 9th line. Remove the duplicate.

It seems the duplicate is the other one and you removed wrong one.

Okay, they are on the same level of ifdeffery, technically there is no difference. Practically the other one closer to its user.

Signature · 2 lines
With Best Regards,
Andy Shevchenko