* [rfc] Remove member .name from struct netpoll
@ 2011-07-01 17:07 Joe Perches
2011-07-04 2:07 ` Cong Wang
0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2011-07-01 17:07 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, LKML
struct netpoll has member .name
struct netpoll {
struct net_device *dev;
char dev_name[IFNAMSIZ];
const char *name;
[...]
};
that is set only by netconsole.c
static struct netconsole_target *alloc_param_target(char *target_config)
{
[...]
nt->np.name = "netconsole";
and used only by net/core/netpoll.c to emit "netconsole: " on
logging messages.
e.g.
void netpoll_print_options(struct netpoll *np)
{
printk(KERN_INFO "%s: local port %d\n",
np->name, np->local_port);
I think it'd be more common to use pr_fmt and pr_<level>
to emit these logging messages.
Are there out of tree users or plans to use "struct netpoll"
by other modules?
If not, I propose to remove name from the struct.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [rfc] Remove member .name from struct netpoll
2011-07-01 17:07 [rfc] Remove member .name from struct netpoll Joe Perches
@ 2011-07-04 2:07 ` Cong Wang
0 siblings, 0 replies; 2+ messages in thread
From: Cong Wang @ 2011-07-04 2:07 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, LKML, Matt Mackall
于 2011年07月02日 01:07, Joe Perches 写道:
> struct netpoll has member .name
>
> struct netpoll {
> struct net_device *dev;
> char dev_name[IFNAMSIZ];
> const char *name;
> [...]
> };
>
> that is set only by netconsole.c
>
> static struct netconsole_target *alloc_param_target(char *target_config)
> {
> [...]
> nt->np.name = "netconsole";
>
> and used only by net/core/netpoll.c to emit "netconsole: " on
> logging messages.
>
Probably this is due to that in history netdump was another user of it.
>
> Are there out of tree users or plans to use "struct netpoll"
> by other modules?
>
AFAIK, netoops will use it too, see
https://lkml.org/lkml/2010/11/2/299
Cc'ing Matt in case I miss something...
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-04 2:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01 17:07 [rfc] Remove member .name from struct netpoll Joe Perches
2011-07-04 2:07 ` Cong Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.