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

Configure Feed

Select the types of activity you want to include in your feed.

tty: goldfish: use bool for is_write parameter

do_rw_io()'s is_write parameter is boolean, but typed int. Switch to the
former, so that it's obvious. (And the two users too.)

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

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
e01b5712 173ebded

+4 -4
+4 -4
drivers/tty/goldfish.c
··· 53 53 static void do_rw_io(struct goldfish_tty *qtty, 54 54 unsigned long address, 55 55 unsigned int count, 56 - int is_write) 56 + bool is_write) 57 57 { 58 58 unsigned long irq_flags; 59 59 void __iomem *base = qtty->base; ··· 76 76 static void goldfish_tty_rw(struct goldfish_tty *qtty, 77 77 unsigned long addr, 78 78 unsigned int count, 79 - int is_write) 79 + bool is_write) 80 80 { 81 81 dma_addr_t dma_handle; 82 82 enum dma_data_direction dma_dir; ··· 129 129 { 130 130 struct goldfish_tty *qtty = &goldfish_ttys[line]; 131 131 132 - goldfish_tty_rw(qtty, (unsigned long)buf, count, 1); 132 + goldfish_tty_rw(qtty, (unsigned long)buf, count, true); 133 133 } 134 134 135 135 static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id) ··· 145 145 146 146 count = tty_prepare_flip_string(&qtty->port, &buf, count); 147 147 148 - goldfish_tty_rw(qtty, (unsigned long)buf, count, 0); 148 + goldfish_tty_rw(qtty, (unsigned long)buf, count, false); 149 149 150 150 tty_flip_buffer_push(&qtty->port); 151 151 return IRQ_HANDLED;