History

tty: sysrq: switch sysrq handlers from int to u8

The passed parameter to sysrq handlers is a key (a character). So change the type from 'int' to 'u8'. Let it specifically be 'u8' for two reasons: * unsigned: unsigned values come from the upper layers (devices) and the tty layer assumes unsigned on most places, and * 8-bit: as that what's supposed to be one day in all the layers built on the top of tty. (Currently, we use mostly 'unsigned char' and somewhere still only 'char'. (But that also translates to the former thanks to -funsigned-char.))

Jiri Slaby committed 3 years ago

Commit bcb48181 parent 00ef7ef11 files · +31 −31Browse files

Showing the changes to kernel/debug/debug_core.c (1 of 11 files). Show all

Unified · Split

kernel/debug/debug_core.c+1−1
@@ -968,7 +968,7 @@ static int __init opt_kgdb_con(char *str) · 967 unmodified lines
968early_param("kgdbcon", opt_kgdb_con);968early_param("kgdbcon", opt_kgdb_con);
969 969
970#ifdef CONFIG_MAGIC_SYSRQ970#ifdef CONFIG_MAGIC_SYSRQ
971static void sysrq_handle_dbg(int key)971static void sysrq_handle_dbg(u8 key)
972{972{
973 if (!dbg_io_ops) {973 if (!dbg_io_ops) {
974 pr_crit("ERROR: No KGDB I/O module available\n");974 pr_crit("ERROR: No KGDB I/O module available\n");