We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 168b504 commit b0db926Copy full SHA for b0db926
drivers/tty/serial/jsm/jsm_neo.c
@@ -291,7 +291,8 @@ static void neo_copy_data_from_uart_to_queue(struct jsm_channel *ch)
291
ch->ch_cached_lsr = 0;
292
293
/* Store how much space we have left in the queue */
294
- if ((qleft = tail - head - 1) < 0)
+ qleft = tail - head - 1;
295
+ if (qleft < 0)
296
qleft += RQUEUEMASK + 1;
297
298
/*
drivers/tty/serial/jsm/jsm_tty.c
@@ -749,7 +749,8 @@ void jsm_check_queue_flow_control(struct jsm_channel *ch)
749
int qleft;
750
751
752
- if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0)
+ qleft = ch->ch_r_tail - ch->ch_r_head - 1;
753
754
755
756
0 commit comments