diff options
Diffstat (limited to 'drivers/char/tty_buffer.c')
-rw-r--r-- | drivers/char/tty_buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tty_buffer.c b/drivers/char/tty_buffer.c index af8d97715728..7ee52164d474 100644 --- a/drivers/char/tty_buffer.c +++ b/drivers/char/tty_buffer.c | |||
@@ -248,7 +248,7 @@ int tty_insert_flip_string_fixed_flag(struct tty_struct *tty, | |||
248 | { | 248 | { |
249 | int copied = 0; | 249 | int copied = 0; |
250 | do { | 250 | do { |
251 | int goal = min(size - copied, TTY_BUFFER_PAGE); | 251 | int goal = min_t(size_t, size - copied, TTY_BUFFER_PAGE); |
252 | int space = tty_buffer_request_room(tty, goal); | 252 | int space = tty_buffer_request_room(tty, goal); |
253 | struct tty_buffer *tb = tty->buf.tail; | 253 | struct tty_buffer *tb = tty->buf.tail; |
254 | /* If there is no space then tb may be NULL */ | 254 | /* If there is no space then tb may be NULL */ |
@@ -285,7 +285,7 @@ int tty_insert_flip_string_flags(struct tty_struct *tty, | |||
285 | { | 285 | { |
286 | int copied = 0; | 286 | int copied = 0; |
287 | do { | 287 | do { |
288 | int goal = min(size - copied, TTY_BUFFER_PAGE); | 288 | int goal = min_t(size_t, size - copied, TTY_BUFFER_PAGE); |
289 | int space = tty_buffer_request_room(tty, goal); | 289 | int space = tty_buffer_request_room(tty, goal); |
290 | struct tty_buffer *tb = tty->buf.tail; | 290 | struct tty_buffer *tb = tty->buf.tail; |
291 | /* If there is no space then tb may be NULL */ | 291 | /* If there is no space then tb may be NULL */ |