History

lockdep: Move list.h inclusion into lockdep.h

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.

Herbert Xu committed 6 years ago

Commit 5be542e1 parent f9ad4a52 files · +1 −2Browse files

Showing the changes to include/linux (2 of 2 files). Show all

Unified · Split

2 files
  1. include/linux/lockdep.h +1 −0
  2. include/linux/lockdep_types.h +0 −2
include/linux/lockdep.h+1−0
@@ -22,6 +22,7 @@ extern int lock_stat; · 21 unmodified lines
2222 #ifdef CONFIG_LOCKDEP
2323
2424 #include <linux/linkage.h>
25+#include <linux/list.h>
2526 #include <linux/debug_locks.h>
2627 #include <linux/stacktrace.h>
2728
include/linux/lockdep_types.h+0−2
@@ -32,8 +32,6 @@ enum lockdep_wait_type { · 31 unmodified lines
3232
3333 #ifdef CONFIG_LOCKDEP
3434
35−#include <linux/list.h>
36−
3735 /*
3836 * We'd rather not expose kernel/lockdep_states.h this wide, but we do need
3937 * the total number of states... :-(

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t