Commit 1495cc9df4e81f5a8fa9b0b8f1034b14d24b7d8c
1 parent
da5cabf80e
Exists in
master
and in
39 other branches
Input: sysrq - drop tty argument from sysrq ops handlers
Noone is using tty argument so let's get rid of it. Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Showing 9 changed files with 34 additions and 31 deletions Side-by-side Diff
arch/arm/kernel/etm.c
arch/powerpc/xmon/xmon.c
... | ... | @@ -2880,15 +2880,14 @@ |
2880 | 2880 | } |
2881 | 2881 | |
2882 | 2882 | #ifdef CONFIG_MAGIC_SYSRQ |
2883 | -static void sysrq_handle_xmon(int key, struct tty_struct *tty) | |
2883 | +static void sysrq_handle_xmon(int key) | |
2884 | 2884 | { |
2885 | 2885 | /* ensure xmon is enabled */ |
2886 | 2886 | xmon_init(1); |
2887 | 2887 | debugger(get_irq_regs()); |
2888 | 2888 | } |
2889 | 2889 | |
2890 | -static struct sysrq_key_op sysrq_xmon_op = | |
2891 | -{ | |
2890 | +static struct sysrq_key_op sysrq_xmon_op = { | |
2892 | 2891 | .handler = sysrq_handle_xmon, |
2893 | 2892 | .help_msg = "Xmon", |
2894 | 2893 | .action_msg = "Entering xmon", |
arch/sparc/kernel/process_64.c
drivers/char/sysrq.c
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | __setup("sysrq_always_enabled", sysrq_always_enabled_setup); |
77 | 77 | |
78 | 78 | |
79 | -static void sysrq_handle_loglevel(int key, struct tty_struct *tty) | |
79 | +static void sysrq_handle_loglevel(int key) | |
80 | 80 | { |
81 | 81 | int i; |
82 | 82 | |
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | }; |
94 | 94 | |
95 | 95 | #ifdef CONFIG_VT |
96 | -static void sysrq_handle_SAK(int key, struct tty_struct *tty) | |
96 | +static void sysrq_handle_SAK(int key) | |
97 | 97 | { |
98 | 98 | struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work; |
99 | 99 | schedule_work(SAK_work); |
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 | #endif |
110 | 110 | |
111 | 111 | #ifdef CONFIG_VT |
112 | -static void sysrq_handle_unraw(int key, struct tty_struct *tty) | |
112 | +static void sysrq_handle_unraw(int key) | |
113 | 113 | { |
114 | 114 | struct kbd_struct *kbd = &kbd_table[fg_console]; |
115 | 115 | |
... | ... | @@ -126,7 +126,7 @@ |
126 | 126 | #define sysrq_unraw_op (*(struct sysrq_key_op *)NULL) |
127 | 127 | #endif /* CONFIG_VT */ |
128 | 128 | |
129 | -static void sysrq_handle_crash(int key, struct tty_struct *tty) | |
129 | +static void sysrq_handle_crash(int key) | |
130 | 130 | { |
131 | 131 | char *killer = NULL; |
132 | 132 | |
... | ... | @@ -141,7 +141,7 @@ |
141 | 141 | .enable_mask = SYSRQ_ENABLE_DUMP, |
142 | 142 | }; |
143 | 143 | |
144 | -static void sysrq_handle_reboot(int key, struct tty_struct *tty) | |
144 | +static void sysrq_handle_reboot(int key) | |
145 | 145 | { |
146 | 146 | lockdep_off(); |
147 | 147 | local_irq_enable(); |
... | ... | @@ -154,7 +154,7 @@ |
154 | 154 | .enable_mask = SYSRQ_ENABLE_BOOT, |
155 | 155 | }; |
156 | 156 | |
157 | -static void sysrq_handle_sync(int key, struct tty_struct *tty) | |
157 | +static void sysrq_handle_sync(int key) | |
158 | 158 | { |
159 | 159 | emergency_sync(); |
160 | 160 | } |
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | .enable_mask = SYSRQ_ENABLE_SYNC, |
166 | 166 | }; |
167 | 167 | |
168 | -static void sysrq_handle_show_timers(int key, struct tty_struct *tty) | |
168 | +static void sysrq_handle_show_timers(int key) | |
169 | 169 | { |
170 | 170 | sysrq_timer_list_show(); |
171 | 171 | } |
... | ... | @@ -176,7 +176,7 @@ |
176 | 176 | .action_msg = "Show clockevent devices & pending hrtimers (no others)", |
177 | 177 | }; |
178 | 178 | |
179 | -static void sysrq_handle_mountro(int key, struct tty_struct *tty) | |
179 | +static void sysrq_handle_mountro(int key) | |
180 | 180 | { |
181 | 181 | emergency_remount(); |
182 | 182 | } |
... | ... | @@ -188,7 +188,7 @@ |
188 | 188 | }; |
189 | 189 | |
190 | 190 | #ifdef CONFIG_LOCKDEP |
191 | -static void sysrq_handle_showlocks(int key, struct tty_struct *tty) | |
191 | +static void sysrq_handle_showlocks(int key) | |
192 | 192 | { |
193 | 193 | debug_show_all_locks(); |
194 | 194 | } |
... | ... | @@ -226,7 +226,7 @@ |
226 | 226 | |
227 | 227 | static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus); |
228 | 228 | |
229 | -static void sysrq_handle_showallcpus(int key, struct tty_struct *tty) | |
229 | +static void sysrq_handle_showallcpus(int key) | |
230 | 230 | { |
231 | 231 | /* |
232 | 232 | * Fall back to the workqueue based printing if the |
... | ... | @@ -252,7 +252,7 @@ |
252 | 252 | }; |
253 | 253 | #endif |
254 | 254 | |
255 | -static void sysrq_handle_showregs(int key, struct tty_struct *tty) | |
255 | +static void sysrq_handle_showregs(int key) | |
256 | 256 | { |
257 | 257 | struct pt_regs *regs = get_irq_regs(); |
258 | 258 | if (regs) |
... | ... | @@ -266,7 +266,7 @@ |
266 | 266 | .enable_mask = SYSRQ_ENABLE_DUMP, |
267 | 267 | }; |
268 | 268 | |
269 | -static void sysrq_handle_showstate(int key, struct tty_struct *tty) | |
269 | +static void sysrq_handle_showstate(int key) | |
270 | 270 | { |
271 | 271 | show_state(); |
272 | 272 | } |
... | ... | @@ -277,7 +277,7 @@ |
277 | 277 | .enable_mask = SYSRQ_ENABLE_DUMP, |
278 | 278 | }; |
279 | 279 | |
280 | -static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty) | |
280 | +static void sysrq_handle_showstate_blocked(int key) | |
281 | 281 | { |
282 | 282 | show_state_filter(TASK_UNINTERRUPTIBLE); |
283 | 283 | } |
... | ... | @@ -291,7 +291,7 @@ |
291 | 291 | #ifdef CONFIG_TRACING |
292 | 292 | #include <linux/ftrace.h> |
293 | 293 | |
294 | -static void sysrq_ftrace_dump(int key, struct tty_struct *tty) | |
294 | +static void sysrq_ftrace_dump(int key) | |
295 | 295 | { |
296 | 296 | ftrace_dump(DUMP_ALL); |
297 | 297 | } |
... | ... | @@ -305,7 +305,7 @@ |
305 | 305 | #define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL) |
306 | 306 | #endif |
307 | 307 | |
308 | -static void sysrq_handle_showmem(int key, struct tty_struct *tty) | |
308 | +static void sysrq_handle_showmem(int key) | |
309 | 309 | { |
310 | 310 | show_mem(); |
311 | 311 | } |
... | ... | @@ -330,7 +330,7 @@ |
330 | 330 | } |
331 | 331 | } |
332 | 332 | |
333 | -static void sysrq_handle_term(int key, struct tty_struct *tty) | |
333 | +static void sysrq_handle_term(int key) | |
334 | 334 | { |
335 | 335 | send_sig_all(SIGTERM); |
336 | 336 | console_loglevel = 8; |
... | ... | @@ -349,7 +349,7 @@ |
349 | 349 | |
350 | 350 | static DECLARE_WORK(moom_work, moom_callback); |
351 | 351 | |
352 | -static void sysrq_handle_moom(int key, struct tty_struct *tty) | |
352 | +static void sysrq_handle_moom(int key) | |
353 | 353 | { |
354 | 354 | schedule_work(&moom_work); |
355 | 355 | } |
... | ... | @@ -361,7 +361,7 @@ |
361 | 361 | }; |
362 | 362 | |
363 | 363 | #ifdef CONFIG_BLOCK |
364 | -static void sysrq_handle_thaw(int key, struct tty_struct *tty) | |
364 | +static void sysrq_handle_thaw(int key) | |
365 | 365 | { |
366 | 366 | emergency_thaw_all(); |
367 | 367 | } |
... | ... | @@ -373,7 +373,7 @@ |
373 | 373 | }; |
374 | 374 | #endif |
375 | 375 | |
376 | -static void sysrq_handle_kill(int key, struct tty_struct *tty) | |
376 | +static void sysrq_handle_kill(int key) | |
377 | 377 | { |
378 | 378 | send_sig_all(SIGKILL); |
379 | 379 | console_loglevel = 8; |
... | ... | @@ -385,7 +385,7 @@ |
385 | 385 | .enable_mask = SYSRQ_ENABLE_SIGNAL, |
386 | 386 | }; |
387 | 387 | |
388 | -static void sysrq_handle_unrt(int key, struct tty_struct *tty) | |
388 | +static void sysrq_handle_unrt(int key) | |
389 | 389 | { |
390 | 390 | normalize_rt_tasks(); |
391 | 391 | } |
... | ... | @@ -520,7 +520,7 @@ |
520 | 520 | if (!check_mask || sysrq_on_mask(op_p->enable_mask)) { |
521 | 521 | printk("%s\n", op_p->action_msg); |
522 | 522 | console_loglevel = orig_log_level; |
523 | - op_p->handler(key, tty); | |
523 | + op_p->handler(key); | |
524 | 524 | } else { |
525 | 525 | printk("This sysrq operation is disabled.\n"); |
526 | 526 | } |
drivers/gpu/drm/drm_fb_helper.c
... | ... | @@ -369,7 +369,7 @@ |
369 | 369 | } |
370 | 370 | static DECLARE_WORK(drm_fb_helper_restore_work, drm_fb_helper_restore_work_fn); |
371 | 371 | |
372 | -static void drm_fb_helper_sysrq(int dummy1, struct tty_struct *dummy3) | |
372 | +static void drm_fb_helper_sysrq(int dummy1) | |
373 | 373 | { |
374 | 374 | schedule_work(&drm_fb_helper_restore_work); |
375 | 375 | } |
drivers/net/ibm_newemac/debug.c
include/linux/sysrq.h
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | #define SYSRQ_ENABLE_RTNICE 0x0100 |
32 | 32 | |
33 | 33 | struct sysrq_key_op { |
34 | - void (*handler)(int, struct tty_struct *); | |
34 | + void (*handler)(int); | |
35 | 35 | char *help_msg; |
36 | 36 | char *action_msg; |
37 | 37 | int enable_mask; |
... | ... | @@ -55,6 +55,10 @@ |
55 | 55 | #else |
56 | 56 | |
57 | 57 | static inline void handle_sysrq(int key, struct tty_struct *tty) |
58 | +{ | |
59 | +} | |
60 | + | |
61 | +static inline void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | |
58 | 62 | { |
59 | 63 | } |
60 | 64 |
kernel/debug/debug_core.c
kernel/power/poweroff.c
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | |
25 | 25 | static DECLARE_WORK(poweroff_work, do_poweroff); |
26 | 26 | |
27 | -static void handle_poweroff(int key, struct tty_struct *tty) | |
27 | +static void handle_poweroff(int key) | |
28 | 28 | { |
29 | 29 | /* run sysrq poweroff on boot cpu */ |
30 | 30 | schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work); |