[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1265961380.32651.13.camel@wall-e>
Date: Fri, 12 Feb 2010 08:56:20 +0100
From: Stefani Seibold <stefani@...bold.net>
To: linux-kernel <linux-kernel@...r.kernel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andi Kleen <andi@...stfloor.org>,
Greg Kroah-Hartman <gregkh@...e.de>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Theodore Tso <tytso@....edu>,
"Ira W. Snyder" <iws@...o.caltech.edu>
Subject: Re: [PATCH 1/4] fix kfifo miss use of nozami.c
User of the kernel fifo should never bypass the API and directly access
the fifo structure. Otherwise it will be very hard to maintain the API.
Signed-off-by: Stefani Seibold <stefani@...bold.net>
---
drivers/char/nozomi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -N -r -p linux-2.6.33-rc7.dummy/drivers/char/nozomi.c linux-2.6.33-rc7.new/drivers/char/nozomi.c
--- linux-2.6.33-rc7.dummy/drivers/char/nozomi.c 2010-02-11 17:05:50.670990421 +0100
+++ linux-2.6.33-rc7.new/drivers/char/nozomi.c 2010-02-11 17:11:20.350865181 +0100
@@ -1743,7 +1743,7 @@ static int ntty_write_room(struct tty_st
if (!port->port.count)
goto exit;
- room = port->fifo_ul.size - kfifo_len(&port->fifo_ul);
+ room = kfifo_avail(&port->fifo_ul);
exit:
mutex_unlock(&port->tty_sem);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists