Commit f82da723398ff18d49275a5f03de6cae5f592e8e
Committed by
David S. Miller
1 parent
9970937273
Exists in
master
and in
20 other branches
Documentation/connector/cn_test.c: don't use gfp_any()
cn_test_timer_func() is a timer handler and can never use GFP_KERNEL - there's no point in using gfp_any() here. Also, use setup_timer(). Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff
Documentation/connector/cn_test.c
... | ... | @@ -137,7 +137,7 @@ |
137 | 137 | |
138 | 138 | memcpy(m + 1, data, m->len); |
139 | 139 | |
140 | - cn_netlink_send(m, 0, gfp_any()); | |
140 | + cn_netlink_send(m, 0, GFP_ATOMIC); | |
141 | 141 | kfree(m); |
142 | 142 | } |
143 | 143 | |
144 | 144 | |
... | ... | @@ -160,10 +160,8 @@ |
160 | 160 | goto err_out; |
161 | 161 | } |
162 | 162 | |
163 | - init_timer(&cn_test_timer); | |
164 | - cn_test_timer.function = cn_test_timer_func; | |
163 | + setup_timer(&cn_test_timer, cn_test_timer_func, 0); | |
165 | 164 | cn_test_timer.expires = jiffies + HZ; |
166 | - cn_test_timer.data = 0; | |
167 | 165 | add_timer(&cn_test_timer); |
168 | 166 | |
169 | 167 | return 0; |