diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-23 12:32:30 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-01-23 12:32:30 -0500 |
commit | 8723d5037cafea09c7242303c6c8e5d7058cec61 (patch) | |
tree | 198cd51a199501557657dac0f2c46faa6be0a4e4 /include | |
parent | c14afb82ffff5903a701a9fb737ac20f36d1f755 (diff) |
async: bring sanity to the use of words domain and running
In the beginning, running lists were literal struct list_heads. Later
on, struct async_domain was added. For some reason, while the
conversion substituted list_heads with async_domains, the variable
names weren't fully converted. In more places, "running" was used for
struct async_domain while other places adopted new "domain" name.
The situation is made much worse by having async_domain's running list
named "domain" and async_entry's field pointing to async_domain named
"running".
So, we end up with mix of "running" and "domain" for variable names
for async_domain, with the field names of async_domain and async_entry
swapped between "running" and "domain".
It feels almost intentionally made to be as confusing as possible.
Bring some sanity by
* Renaming all async_domain variables "domain".
* s/async_running/async_dfl_domain/
* s/async_domain->domain/async_domain->running/
* s/async_entry->running/async_entry->domain/
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/async.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/async.h b/include/linux/async.h index 345169cfa304..34ff5c610e0e 100644 --- a/include/linux/async.h +++ b/include/linux/async.h | |||
@@ -19,7 +19,7 @@ typedef u64 async_cookie_t; | |||
19 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); | 19 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); |
20 | struct async_domain { | 20 | struct async_domain { |
21 | struct list_head node; | 21 | struct list_head node; |
22 | struct list_head domain; | 22 | struct list_head running; |
23 | int count; | 23 | int count; |
24 | unsigned registered:1; | 24 | unsigned registered:1; |
25 | }; | 25 | }; |
@@ -29,7 +29,7 @@ struct async_domain { | |||
29 | */ | 29 | */ |
30 | #define ASYNC_DOMAIN(_name) \ | 30 | #define ASYNC_DOMAIN(_name) \ |
31 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | 31 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ |
32 | .domain = LIST_HEAD_INIT(_name.domain), \ | 32 | .running = LIST_HEAD_INIT(_name.running), \ |
33 | .count = 0, \ | 33 | .count = 0, \ |
34 | .registered = 1 } | 34 | .registered = 1 } |
35 | 35 | ||
@@ -39,7 +39,7 @@ struct async_domain { | |||
39 | */ | 39 | */ |
40 | #define ASYNC_DOMAIN_EXCLUSIVE(_name) \ | 40 | #define ASYNC_DOMAIN_EXCLUSIVE(_name) \ |
41 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | 41 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ |
42 | .domain = LIST_HEAD_INIT(_name.domain), \ | 42 | .running = LIST_HEAD_INIT(_name.running), \ |
43 | .count = 0, \ | 43 | .count = 0, \ |
44 | .registered = 0 } | 44 | .registered = 0 } |
45 | 45 | ||