Commit b0db9263 authored by Alexander Vorwerk's avatar Alexander Vorwerk Committed by Greg Kroah-Hartman
Browse files

tty: serial: jsm: fix two assignments in if conditions



Fixes two warnings reported of the form
"ERROR: do not use assignment in if condition"
reported by checkpatch.pl.

Signed-off-by: default avatarAlexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
Link: https://lore.kernel.org/r/20220315020745.15752-1-alexander.vorwerk@stud.uni-goettingen.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 168b504b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -291,7 +291,8 @@ static void neo_copy_data_from_uart_to_queue(struct jsm_channel *ch)
	ch->ch_cached_lsr = 0;

	/* Store how much space we have left in the queue */
	if ((qleft = tail - head - 1) < 0)
	qleft = tail - head - 1;
	if (qleft < 0)
		qleft += RQUEUEMASK + 1;

	/*
+2 −1
Original line number Diff line number Diff line
@@ -749,7 +749,8 @@ void jsm_check_queue_flow_control(struct jsm_channel *ch)
	int qleft;

	/* Store how much space we have left in the queue */
	if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0)
	qleft = ch->ch_r_tail - ch->ch_r_head - 1;
	if (qleft < 0)
		qleft += RQUEUEMASK + 1;

	/*