diff options
author | Joe Perches <joe@perches.com> | 2011-05-26 06:58:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-02 17:04:39 -0400 |
commit | afab2d2999e9c12cf319e1f19da9a0a754560d80 (patch) | |
tree | a36a57beddf248af65dc2299f26f5e7c60da3296 /net/8021q/vlan.c | |
parent | 8a07eb0a50aebc8c95478d49c28c7f8419a26cef (diff) |
net: 8021q: Add pr_fmt
Use the current logging style.
Add #define pr_fmt and remove embedded prefix from formats.
Not converting the current pr_<level> uses to netdev_<level>
because all the output here is nicely prefaced with "8021q: ".
Remove __func__ use from proc registration failure message.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index c7a581a96894..cfa9afe9b11e 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * 2 of the License, or (at your option) any later version. | 18 | * 2 of the License, or (at your option) any later version. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #include <linux/capability.h> | 23 | #include <linux/capability.h> |
22 | #include <linux/module.h> | 24 | #include <linux/module.h> |
23 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
@@ -149,13 +151,13 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id) | |||
149 | const struct net_device_ops *ops = real_dev->netdev_ops; | 151 | const struct net_device_ops *ops = real_dev->netdev_ops; |
150 | 152 | ||
151 | if (real_dev->features & NETIF_F_VLAN_CHALLENGED) { | 153 | if (real_dev->features & NETIF_F_VLAN_CHALLENGED) { |
152 | pr_info("8021q: VLANs not supported on %s\n", name); | 154 | pr_info("VLANs not supported on %s\n", name); |
153 | return -EOPNOTSUPP; | 155 | return -EOPNOTSUPP; |
154 | } | 156 | } |
155 | 157 | ||
156 | if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) && | 158 | if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) && |
157 | (!ops->ndo_vlan_rx_add_vid || !ops->ndo_vlan_rx_kill_vid)) { | 159 | (!ops->ndo_vlan_rx_add_vid || !ops->ndo_vlan_rx_kill_vid)) { |
158 | pr_info("8021q: Device %s has buggy VLAN hw accel\n", name); | 160 | pr_info("Device %s has buggy VLAN hw accel\n", name); |
159 | return -EOPNOTSUPP; | 161 | return -EOPNOTSUPP; |
160 | } | 162 | } |
161 | 163 | ||
@@ -344,13 +346,12 @@ static void __vlan_device_event(struct net_device *dev, unsigned long event) | |||
344 | case NETDEV_CHANGENAME: | 346 | case NETDEV_CHANGENAME: |
345 | vlan_proc_rem_dev(dev); | 347 | vlan_proc_rem_dev(dev); |
346 | if (vlan_proc_add_dev(dev) < 0) | 348 | if (vlan_proc_add_dev(dev) < 0) |
347 | pr_warning("8021q: failed to change proc name for %s\n", | 349 | pr_warn("failed to change proc name for %s\n", |
348 | dev->name); | 350 | dev->name); |
349 | break; | 351 | break; |
350 | case NETDEV_REGISTER: | 352 | case NETDEV_REGISTER: |
351 | if (vlan_proc_add_dev(dev) < 0) | 353 | if (vlan_proc_add_dev(dev) < 0) |
352 | pr_warning("8021q: failed to add proc entry for %s\n", | 354 | pr_warn("failed to add proc entry for %s\n", dev->name); |
353 | dev->name); | ||
354 | break; | 355 | break; |
355 | case NETDEV_UNREGISTER: | 356 | case NETDEV_UNREGISTER: |
356 | vlan_proc_rem_dev(dev); | 357 | vlan_proc_rem_dev(dev); |
@@ -374,7 +375,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
374 | if ((event == NETDEV_UP) && | 375 | if ((event == NETDEV_UP) && |
375 | (dev->features & NETIF_F_HW_VLAN_FILTER) && | 376 | (dev->features & NETIF_F_HW_VLAN_FILTER) && |
376 | dev->netdev_ops->ndo_vlan_rx_add_vid) { | 377 | dev->netdev_ops->ndo_vlan_rx_add_vid) { |
377 | pr_info("8021q: adding VLAN 0 to HW filter on device %s\n", | 378 | pr_info("adding VLAN 0 to HW filter on device %s\n", |
378 | dev->name); | 379 | dev->name); |
379 | dev->netdev_ops->ndo_vlan_rx_add_vid(dev, 0); | 380 | dev->netdev_ops->ndo_vlan_rx_add_vid(dev, 0); |
380 | } | 381 | } |