[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 8 Dec 2006 00:41:30 +0000
From: Ralf Baechle <ralf@...ux-mips.org>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] Remove useless memory barrier.
I don't see why there is a memory barrier in copy_from_read_buf() at all.
Even if it was useful spin_unlock_irqrestore implies a barrier.
Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c
index 603b9ad..8df7ff3 100644
--- a/drivers/char/n_tty.c
+++ b/drivers/char/n_tty.c
@@ -1151,7 +1151,6 @@ static int copy_from_read_buf(struct tty
n = min(*nr, n);
spin_unlock_irqrestore(&tty->read_lock, flags);
if (n) {
- mb();
retval = copy_to_user(*b, &tty->read_buf[tty->read_tail], n);
n -= retval;
spin_lock_irqsave(&tty->read_lock, flags);
-
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