netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 19/28] netconsole: Remove bogus check
@ 2007-08-10 21:12 akpm
  2007-08-10 22:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-08-10 21:12 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, satyam, k-keiichi, mpm

From: Satyam Sharma <satyam@infradead.org>

Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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

diff -puN drivers/net/netconsole.c~netconsole-remove-bogus-check drivers/net/netconsole.c
--- a/drivers/net/netconsole.c~netconsole-remove-bogus-check
+++ a/drivers/net/netconsole.c
@@ -67,9 +67,6 @@ static void write_msg(struct console *co
 	int frag, left;
 	unsigned long flags;
 
-	if (!np.dev)
-		return;
-
 	local_irq_save(flags);
 
 	for (left = len; left;) {
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 19/28] netconsole: Remove bogus check
  2007-08-10 21:12 [patch 19/28] netconsole: Remove bogus check akpm
@ 2007-08-10 22:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-08-10 22:28 UTC (permalink / raw)
  To: akpm; +Cc: netdev, satyam, k-keiichi, mpm

From: akpm@linux-foundation.org
Date: Fri, 10 Aug 2007 14:12:03 -0700

> From: Satyam Sharma <satyam@infradead.org>
> 
> Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
> 
> 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>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Applied to net-2.6.24, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-10 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 21:12 [patch 19/28] netconsole: Remove bogus check akpm
2007-08-10 22:28 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).