All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Jiri Slaby <jirislaby@gmail.com>
Subject: Re: [patch] tty: moxa: fix bit test in moxa_start()
Date: Wed, 07 Mar 2012 12:26:38 +0000	[thread overview]
Message-ID: <4F5753FE.4080909@suse.cz> (raw)
In-Reply-To: <20120307100500.GD25452@elgon.mountain>

On 03/07/2012 11:05 AM, Dan Carpenter wrote:
> This is supposed to be doing a shift before the comparison instead of
> just doing a bitwise AND directly.  The current code means the start()
> just returns without doing anything.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

ACK.

It was introduced by this commit which forgot to change that location:
commit a808ac0c4a2c5d81ba38a2a76d4ddc1de40d1539
Author: Alan Cox <alan@linux.intel.com>
Date:   Mon Nov 30 13:18:02 2009 +0000

    tty: moxa: Locking clean up

> diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
> index d15a071..0174d2d 100644
> --- a/drivers/tty/moxa.c
> +++ b/drivers/tty/moxa.c
> @@ -1331,7 +1331,7 @@ static void moxa_start(struct tty_struct *tty)
>  	if (ch = NULL)
>  		return;
>  
> -	if (!(ch->statusflags & TXSTOPPED))
> +	if (!test_bit(TXSTOPPED, &ch->statusflags))
>  		return;
>  
>  	MoxaPortTxEnable(ch);

thanks,
-- 
js
suse labs

WARNING: multiple messages have this Message-ID (diff)
From: Jiri Slaby <jslaby@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Jiri Slaby <jirislaby@gmail.com>
Subject: Re: [patch] tty: moxa: fix bit test in moxa_start()
Date: Wed, 07 Mar 2012 13:26:38 +0100	[thread overview]
Message-ID: <4F5753FE.4080909@suse.cz> (raw)
In-Reply-To: <20120307100500.GD25452@elgon.mountain>

On 03/07/2012 11:05 AM, Dan Carpenter wrote:
> This is supposed to be doing a shift before the comparison instead of
> just doing a bitwise AND directly.  The current code means the start()
> just returns without doing anything.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

ACK.

It was introduced by this commit which forgot to change that location:
commit a808ac0c4a2c5d81ba38a2a76d4ddc1de40d1539
Author: Alan Cox <alan@linux.intel.com>
Date:   Mon Nov 30 13:18:02 2009 +0000

    tty: moxa: Locking clean up

> diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
> index d15a071..0174d2d 100644
> --- a/drivers/tty/moxa.c
> +++ b/drivers/tty/moxa.c
> @@ -1331,7 +1331,7 @@ static void moxa_start(struct tty_struct *tty)
>  	if (ch == NULL)
>  		return;
>  
> -	if (!(ch->statusflags & TXSTOPPED))
> +	if (!test_bit(TXSTOPPED, &ch->statusflags))
>  		return;
>  
>  	MoxaPortTxEnable(ch);

thanks,
-- 
js
suse labs

  reply	other threads:[~2012-03-07 12:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 10:05 [patch] tty: moxa: fix bit test in moxa_start() Dan Carpenter
2012-03-07 10:05 ` Dan Carpenter
2012-03-07 12:26 ` Jiri Slaby [this message]
2012-03-07 12:26   ` Jiri Slaby
2012-03-08 16:08 ` Alan Cox
2012-03-08 16:08   ` Alan Cox

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=4F5753FE.4080909@suse.cz \
    --to=jslaby@suse.cz \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.