projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
brcmfmac: remove unnecessary EXPORT_SYMBOL() usage
[deliverable/linux.git]
/
drivers
/
net
/
netconsole.c
diff --git
a/drivers/net/netconsole.c
b/drivers/net/netconsole.c
index c9a15925a1f757bf1da6ceef594389df15315f24..ba2f5e710af12cc7587f0503ea8dc177d2aba4ed 100644
(file)
--- a/
drivers/net/netconsole.c
+++ b/
drivers/net/netconsole.c
@@
-34,6
+34,8
@@
*
****************************************************************/
*
****************************************************************/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/module.h>
@@
-320,8
+322,8
@@
static ssize_t store_enabled(struct netconsole_target *nt,
if (enabled < 0 || enabled > 1)
return -EINVAL;
if (enabled == nt->enabled) {
if (enabled < 0 || enabled > 1)
return -EINVAL;
if (enabled == nt->enabled) {
- pr
intk(KERN_INFO "netconsole:
network logging has already %s\n",
-
nt->enabled ? "started" : "stopped");
+ pr
_info("
network logging has already %s\n",
+ nt->enabled ? "started" : "stopped");
return -EINVAL;
}
return -EINVAL;
}
@@
-336,7
+338,7
@@
static ssize_t store_enabled(struct netconsole_target *nt,
if (err)
return err;
if (err)
return err;
- pr
intk(KERN_INFO
"netconsole: network logging started\n");
+ pr
_info(
"netconsole: network logging started\n");
} else { /* 0 */
/* We need to disable the netconsole before cleaning it up
* otherwise we might end up in write_msg() with
} else { /* 0 */
/* We need to disable the netconsole before cleaning it up
* otherwise we might end up in write_msg() with
@@
-360,9
+362,8
@@
static ssize_t store_dev_name(struct netconsole_target *nt,
size_t len;
if (nt->enabled) {
size_t len;
if (nt->enabled) {
- printk(KERN_ERR "netconsole: target (%s) is enabled, "
- "disable to update parameters\n",
- config_item_name(&nt->item));
+ pr_err("target (%s) is enabled, disable to update parameters\n",
+ config_item_name(&nt->item));
return -EINVAL;
}
return -EINVAL;
}
@@
-383,9
+384,8
@@
static ssize_t store_local_port(struct netconsole_target *nt,
int rv;
if (nt->enabled) {
int rv;
if (nt->enabled) {
- printk(KERN_ERR "netconsole: target (%s) is enabled, "
- "disable to update parameters\n",
- config_item_name(&nt->item));
+ pr_err("target (%s) is enabled, disable to update parameters\n",
+ config_item_name(&nt->item));
return -EINVAL;
}
return -EINVAL;
}
@@
-402,9
+402,8
@@
static ssize_t store_remote_port(struct netconsole_target *nt,
int rv;
if (nt->enabled) {
int rv;
if (nt->enabled) {
- printk(KERN_ERR "netconsole: target (%s) is enabled, "
- "disable to update parameters\n",
- config_item_name(&nt->item));
+ pr_err("target (%s) is enabled, disable to update parameters\n",
+ config_item_name(&nt->item));
return -EINVAL;
}
return -EINVAL;
}
@@
-419,9
+418,8
@@
static ssize_t store_local_ip(struct netconsole_target *nt,
size_t count)
{
if (nt->enabled) {
size_t count)
{
if (nt->enabled) {
- printk(KERN_ERR "netconsole: target (%s) is enabled, "
- "disable to update parameters\n",
- config_item_name(&nt->item));
+ pr_err("target (%s) is enabled, disable to update parameters\n",
+ config_item_name(&nt->item));
return -EINVAL;
}
return -EINVAL;
}
@@
-429,7
+427,7
@@
static ssize_t store_local_ip(struct netconsole_target *nt,
const char *end;
if (in6_pton(buf, count, nt->np.local_ip.in6.s6_addr, -1, &end) > 0) {
if (*end && *end != '\n') {
const char *end;
if (in6_pton(buf, count, nt->np.local_ip.in6.s6_addr, -1, &end) > 0) {
if (*end && *end != '\n') {
- pr
intk(KERN_ERR "netconsole:
invalid IPv6 address at: <%c>\n", *end);
+ pr
_err("
invalid IPv6 address at: <%c>\n", *end);
return -EINVAL;
}
nt->np.ipv6 = true;
return -EINVAL;
}
nt->np.ipv6 = true;
@@
-450,9
+448,8
@@
static ssize_t store_remote_ip(struct netconsole_target *nt,
size_t count)
{
if (nt->enabled) {
size_t count)
{
if (nt->enabled) {
- printk(KERN_ERR "netconsole: target (%s) is enabled, "
- "disable to update parameters\n",
- config_item_name(&nt->item));
+ pr_err("target (%s) is enabled, disable to update parameters\n",
+ config_item_name(&nt->item));
return -EINVAL;
}
return -EINVAL;
}
@@
-460,7
+457,7
@@
static ssize_t store_remote_ip(struct netconsole_target *nt,
const char *end;
if (in6_pton(buf, count, nt->np.remote_ip.in6.s6_addr, -1, &end) > 0) {
if (*end && *end != '\n') {
const char *end;
if (in6_pton(buf, count, nt->np.remote_ip.in6.s6_addr, -1, &end) > 0) {
if (*end && *end != '\n') {
- pr
intk(KERN_ERR "netconsole:
invalid IPv6 address at: <%c>\n", *end);
+ pr
_err("
invalid IPv6 address at: <%c>\n", *end);
return -EINVAL;
}
nt->np.ipv6 = true;
return -EINVAL;
}
nt->np.ipv6 = true;
@@
-483,9
+480,8
@@
static ssize_t store_remote_mac(struct netconsole_target *nt,
u8 remote_mac[ETH_ALEN];
if (nt->enabled) {
u8 remote_mac[ETH_ALEN];
if (nt->enabled) {
- printk(KERN_ERR "netconsole: target (%s) is enabled, "
- "disable to update parameters\n",
- config_item_name(&nt->item));
+ pr_err("target (%s) is enabled, disable to update parameters\n",
+ config_item_name(&nt->item));
return -EINVAL;
}
return -EINVAL;
}
@@
-708,19
+704,20
@@
restart:
}
spin_unlock_irqrestore(&target_list_lock, flags);
if (stopped) {
}
spin_unlock_irqrestore(&target_list_lock, flags);
if (stopped) {
- printk(KERN_INFO "netconsole: network logging stopped on "
- "interface %s as it ", dev->name);
+ const char *msg = "had an event";
switch (event) {
case NETDEV_UNREGISTER:
switch (event) {
case NETDEV_UNREGISTER:
-
printk(KERN_CONT "unregistered\n")
;
+
msg = "unregistered"
;
break;
case NETDEV_RELEASE:
break;
case NETDEV_RELEASE:
-
printk(KERN_CONT "released slaves\n")
;
+
msg = "released slaves"
;
break;
case NETDEV_JOIN:
break;
case NETDEV_JOIN:
-
printk(KERN_CONT "is joining a master device\n")
;
+
msg = "is joining a master device"
;
break;
}
break;
}
+ pr_info("network logging stopped on interface %s as it %s\n",
+ dev->name, msg);
}
done:
}
done:
@@
-806,7
+803,7
@@
static int __init init_netconsole(void)
goto undonotifier;
register_console(&netconsole);
goto undonotifier;
register_console(&netconsole);
- pr
intk(KERN_INFO "netconsole:
network logging started\n");
+ pr
_info("
network logging started\n");
return err;
return err;
@@
-814,7
+811,7
@@
undonotifier:
unregister_netdevice_notifier(&netconsole_netdev_notifier);
fail:
unregister_netdevice_notifier(&netconsole_netdev_notifier);
fail:
- pr
intk(KERN_ERR "netconsole:
cleaning up\n");
+ pr
_err("
cleaning up\n");
/*
* Remove all targets and destroy them (only targets created
/*
* Remove all targets and destroy them (only targets created
This page took
0.029779 seconds
and
5
git commands to generate.