Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: audit: unify to u8

Somewhere, we use 'char', somewhere 'unsigned char'. Unify to 'u8' as
the rest of the tty layer does.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-31-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
3e04ba41 95713967

+5 -5
+2 -2
drivers/tty/tty.h
··· 101 101 #ifdef CONFIG_AUDIT 102 102 void tty_audit_add_data(const struct tty_struct *tty, const void *data, 103 103 size_t size); 104 - void tty_audit_tiocsti(const struct tty_struct *tty, char ch); 104 + void tty_audit_tiocsti(const struct tty_struct *tty, u8 ch); 105 105 #else 106 106 static inline void tty_audit_add_data(const struct tty_struct *tty, 107 107 const void *data, size_t size) 108 108 { 109 109 } 110 - static inline void tty_audit_tiocsti(const struct tty_struct *tty, char ch) 110 + static inline void tty_audit_tiocsti(const struct tty_struct *tty, u8 ch) 111 111 { 112 112 } 113 113 #endif
+3 -3
drivers/tty/tty_audit.c
··· 17 17 dev_t dev; /* The TTY which the data is from */ 18 18 bool icanon; 19 19 size_t valid; 20 - unsigned char *data; /* Allocated size N_TTY_BUF_SIZE */ 20 + u8 *data; /* Allocated size N_TTY_BUF_SIZE */ 21 21 }; 22 22 23 23 static struct tty_audit_buf *tty_audit_buf_ref(void) ··· 59 59 } 60 60 61 61 static void tty_audit_log(const char *description, dev_t dev, 62 - const unsigned char *data, size_t size) 62 + const u8 *data, size_t size) 63 63 { 64 64 struct audit_buffer *ab; 65 65 pid_t pid = task_pid_nr(current); ··· 134 134 /* 135 135 * tty_audit_tiocsti - Log TIOCSTI 136 136 */ 137 - void tty_audit_tiocsti(const struct tty_struct *tty, char ch) 137 + void tty_audit_tiocsti(const struct tty_struct *tty, u8 ch) 138 138 { 139 139 dev_t dev; 140 140