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

s390 tty: Prepare for put_char to return success/fail

Put the changes into the drivers first. This will still compile/work but
produce a warning if bisected so can still be debugged

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
9e7c9a19 978e595f

+12 -6
+3 -2
drivers/s390/char/con3215.c
··· 982 982 /* 983 983 * Put character routine for 3215 ttys 984 984 */ 985 - static void 985 + static int 986 986 tty3215_put_char(struct tty_struct *tty, unsigned char ch) 987 987 { 988 988 struct raw3215_info *raw; 989 989 990 990 if (!tty) 991 - return; 991 + return 0; 992 992 raw = (struct raw3215_info *) tty->driver_data; 993 993 raw3215_putchar(raw, ch); 994 + return 1; 994 995 } 995 996 996 997 static void
+2 -2
drivers/s390/char/sclp_tty.c
··· 412 412 * - including previous characters from sclp_tty_put_char() and strings from 413 413 * sclp_write() without final '\n' - will be written. 414 414 */ 415 - static void 415 + static int 416 416 sclp_tty_put_char(struct tty_struct *tty, unsigned char ch) 417 417 { 418 418 sclp_tty_chars[sclp_tty_chars_count++] = ch; 419 419 if (ch == '\n' || sclp_tty_chars_count >= SCLP_TTY_BUF_SIZE) { 420 420 sclp_tty_write_string(sclp_tty_chars, sclp_tty_chars_count); 421 421 sclp_tty_chars_count = 0; 422 - } 422 + } return 1; 423 423 } 424 424 425 425 /*
+5 -1
drivers/s390/char/sclp_vt220.c
··· 524 524 * NOTE: include/linux/tty_driver.h specifies that a character should be 525 525 * ignored if there is no room in the queue. This driver implements a different 526 526 * semantic in that it will block when there is no more room left. 527 + * 528 + * FIXME: putchar can currently be called from BH and other non blocking 529 + * handlers so this semantic isn't a good idea. 527 530 */ 528 - static void 531 + static int 529 532 sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) 530 533 { 531 534 __sclp_vt220_write(&ch, 1, 0, 0, 1); 535 + return 1; 532 536 } 533 537 534 538 /*
+2 -1
drivers/s390/char/tty3270.c
··· 965 965 * Insert character into the screen at the current position with the 966 966 * current color and highlight. This function does NOT do cursor movement. 967 967 */ 968 - static void 968 + static int 969 969 tty3270_put_character(struct tty3270 *tp, char ch) 970 970 { 971 971 struct tty3270_line *line; ··· 986 986 cell->character = tp->view.ascebc[(unsigned int) ch]; 987 987 cell->highlight = tp->highlight; 988 988 cell->f_color = tp->f_color; 989 + return 1; 989 990 } 990 991 991 992 /*