From: Matt Mackall <mpm@selenic.com>
To: Hollis Blanchard <hollisb@us.ibm.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1 of 2] netconsole: don't require struct console to send data
Date: Sun, 30 Nov 2008 11:21:34 -0600 [thread overview]
Message-ID: <1228065694.3196.61.camel@calx> (raw)
In-Reply-To: <5b87df37a941e38bfd93.1227820261@localhost.localdomain>
On Thu, 2008-11-27 at 15:11 -0600, Hollis Blanchard wrote:
> This will allow callers not on the console path to use write_msg().
>
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
>
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -67,7 +67,7 @@ __setup("netconsole=", option_setup);
> /* Linked list of all configured targets */
> static LIST_HEAD(target_list);
>
> -/* This needs to be a spinlock because write_msg() cannot sleep */
> +/* This needs to be a spinlock because netconsole_write_msg() cannot sleep */
> static DEFINE_SPINLOCK(target_list_lock);
>
> /**
> @@ -694,7 +694,7 @@ static struct notifier_block netconsole_
> .notifier_call = netconsole_netdev_event,
> };
>
> -static void write_msg(struct console *con, const char *msg, unsigned int len)
> +static void netconsole_write_msg(const char *msg, unsigned int len)
> {
> int frag, left;
> unsigned long flags;
> @@ -728,10 +728,15 @@ static void write_msg(struct console *co
> spin_unlock_irqrestore(&target_list_lock, flags);
> }
>
> +static void netconsole_console_write(struct console *con, const char *msg, unsigned int len)
> +{
> + netconsole_write_msg(msg, len);
> +}
> +
> static struct console netconsole = {
> .name = "netcon",
> .flags = CON_ENABLED,
> - .write = write_msg,
> + .write = netconsole_console_write,
> };
This looks fine functionally, but the name change strikes me as
gratuitous.
> static int __init init_netconsole(void)
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2008-11-30 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 21:11 [PATCH 0 of 2] implement tty driver for netconsole Hollis Blanchard
2008-11-27 21:11 ` [PATCH 1 of 2] netconsole: don't require struct console to send data Hollis Blanchard
2008-11-30 17:21 ` Matt Mackall [this message]
2008-11-27 21:11 ` [PATCH 2 of 2] netconsole: add write-only tty driver Hollis Blanchard
2008-11-27 21:47 ` Evgeniy Polyakov
2008-11-28 5:25 ` Hollis Blanchard
2008-11-30 17:28 ` Matt Mackall
2008-11-27 23:09 ` [PATCH 0 of 2] implement tty driver for netconsole Matt Mackall
2008-11-30 5:39 ` 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=1228065694.3196.61.camel@calx \
--to=mpm@selenic.com \
--cc=hollisb@us.ibm.com \
--cc=netdev@vger.kernel.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).