From: akpm@linux-foundation.org
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, akpm@linux-foundation.org,
satyam@infradead.org, k-keiichi@bx.jp.nec.com, mpm@selenic.com
Subject: [patch 19/28] netconsole: Remove bogus check
Date: Fri, 10 Aug 2007 14:12:03 -0700 [thread overview]
Message-ID: <200708102112.l7ALC3DC009436@imap1.linux-foundation.org> (raw)
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;) {
_
next reply other threads:[~2007-08-10 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 21:12 akpm [this message]
2007-08-10 22:28 ` [patch 19/28] netconsole: Remove bogus check David Miller
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=200708102112.l7ALC3DC009436@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=k-keiichi@bx.jp.nec.com \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.org \
--cc=satyam@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).