From: Greg KH <gregkh@linuxfoundation.org>
To: Sahil Patidar <sahilpatidar4051@gmail.com>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: serial: jsm_tty: fixed a assignment in if condition
Date: Mon, 15 Nov 2021 19:42:32 +0100 [thread overview]
Message-ID: <YZKqGGsRQtSbIQrg@kroah.com> (raw)
In-Reply-To: <20211115182413.10861-1-sahilpatidar4051@gmail.com>
On Mon, Nov 15, 2021 at 11:54:13PM +0530, Sahil Patidar wrote:
> Fixed assignment in if condition.
What exactly is "fixed"?
And why are there two spaces in your subject line?
>
> Signed-off-by: Sahil Patidar <sahilpatidar4051@gmail.com>
> ---
> drivers/tty/serial/jsm/jsm_tty.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
> index d74cbbbf33c6..44507b1ff93a 100644
> --- a/drivers/tty/serial/jsm/jsm_tty.c
> +++ b/drivers/tty/serial/jsm/jsm_tty.c
> @@ -746,10 +746,10 @@ static void jsm_carrier(struct jsm_channel *ch)
> void jsm_check_queue_flow_control(struct jsm_channel *ch)
> {
> struct board_ops *bd_ops = ch->ch_bd->bd_ops;
> - int qleft;
> + int qleft = ch->ch_r_tail - ch->ch_r_head - 1;
>
> /* Store how much space we have left in the queue */
> - if ((qleft = ch->ch_r_tail - ch->ch_r_head - 1) < 0)
> + if (qleft < 0)
What was wrong with the original code that required this change?
thanks,
greg k-h
prev parent reply other threads:[~2021-11-16 0:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 18:24 [PATCH] tty: serial: jsm_tty: fixed a assignment in if condition Sahil Patidar
2021-11-15 18:42 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YZKqGGsRQtSbIQrg@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sahilpatidar4051@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).