From: Adrian Bunk <bunk@stusta.de>
To: Paul Fulghum <paulkf@microgate.com>
Cc: linux-kernel@vger.kernel.org
Subject: drivers/char/synclink_gt.c: chars don't have more than 8 bits
Date: Sat, 26 Aug 2006 04:01:23 +0200 [thread overview]
Message-ID: <20060826020123.GB4765@stusta.de> (raw)
The GNU C compiler (SVN version) spotted the following buggy code in
drivers/char/synclink_gt.c:
<-- snip -->
...
static void rx_async(struct slgt_info *info)
{
...
unsigned char *p;
unsigned char status;
...
if ((status = *(p+1) & (BIT9 + BIT8))) {
if (status & BIT9)
icount->parity++;
else if (status & BIT8)
icount->frame++;
/* discard char if tty control flags say so */
if (status & info->ignore_status_mask)
continue;
if (status & BIT9)
stat = TTY_PARITY;
else if (status & BIT8)
stat = TTY_FRAME;
}
...
<-- snip -->
Since there are no bits 8 or 9 in a char this code is currently
dead code.
cu
Adrian
--
Gentoo kernels are 42 times more popular than SUSE kernels among
KLive users (a service by SUSE contractor Andrea Arcangeli that
gathers data about kernels from many users worldwide).
There are three kinds of lies: Lies, Damn Lies, and Statistics.
Benjamin Disraeli
next reply other threads:[~2006-08-26 2:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-26 2:01 Adrian Bunk [this message]
2006-08-26 2:49 ` drivers/char/synclink_gt.c: chars don't have more than 8 bits Paul Fulghum
2006-08-28 19:07 ` [PATCH] synclink_gt fix receive tty error handling Paul Fulghum
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=20060826020123.GB4765@stusta.de \
--to=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=paulkf@microgate.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