[PATCH v3 -mm 2/9] netconsole: Remove bogus check

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Kernel Mailing List <linux-kernel@...>
Cc: Keiichi Kii <k-keiichi@...>, Netdev <netdev@...>, Joel Becker <joel.becker@...>, Matt Mackall <mpm@...>, Andrew Morton <akpm@...>, David Miller <davem@...>
Date: Sunday, July 29, 2007 - 10:48 pm

From: Satyam Sharma <satyam@infradead.org>

[2/9] netconsole: Remove bogus check

The (!np.dev) check in write_msg() is bogus (always false), because:
np.dev is set by netpoll_setup(), which is called by init_netconsole()
before register_console(), so write_msg() cannot be triggered unless
netpoll_setup() successfully set np.dev. Also np.dev cannot go away
from under us, because netpoll_setup() grabs us reference on it. So
let's remove the bogus check.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>

---

 drivers/net/netconsole.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index f1c2a2d..2c2aef1 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -67,9 +67,6 @@ static void write_msg(struct console *con, const char *msg, unsigned int len)
 	int frag, left;
 	unsigned long flags;
 
-	if (!np.dev)
-		return;
-
 	local_irq_save(flags);
 
 	for (left = len; left;) {
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v3 -mm 6/9] netconsole: Introduce netconsole_target, Satyam Sharma, (Sun Jul 29, 10:48 pm)
[PATCH v3 -mm 2/9] netconsole: Remove bogus check, Satyam Sharma, (Sun Jul 29, 10:48 pm)