Currently lockdep_types.h includes list.h without actually using any of its macros or functions. All it needs are the type definitions which were moved into types.h long ago. This potentially causes inclusion loops because both are included by many core header files. This patch moves the list.h inclusion into lockdep.h. Note that we could probably remove it completely but that could potentially result in compile failures should any end users not include list.h directly and also be unlucky enough to not get list.h via some other header file.
Showing the changes to include/linux (2 of 2 files). Show all
Unified · Split
| @@ -22,6 +22,7 @@ extern int lock_stat; · 21 unmodified lines | |||
| 22 | #ifdef CONFIG_LOCKDEP | 22 | #ifdef CONFIG_LOCKDEP |
| 23 | 23 | ||
| 24 | #include <linux/linkage.h> | 24 | #include <linux/linkage.h> |
| 25 | #include <linux/list.h> | ||
| 25 | #include <linux/debug_locks.h> | 26 | #include <linux/debug_locks.h> |
| 26 | #include <linux/stacktrace.h> | 27 | #include <linux/stacktrace.h> |
| 27 | 28 | ||
| @@ -32,8 +32,6 @@ enum lockdep_wait_type { · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | #ifdef CONFIG_LOCKDEP | 33 | #ifdef CONFIG_LOCKDEP |
| 34 | 34 | ||
| 35 | #include <linux/list.h> | ||
| 36 | |||
| 37 | /* | 35 | /* |
| 38 | * We'd rather not expose kernel/lockdep_states.h this wide, but we do need | 36 | * We'd rather not expose kernel/lockdep_states.h this wide, but we do need |
| 39 | * the total number of states... :-( | 37 | * the total number of states... :-( |