aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-26 06:58:31 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-02 17:04:39 -0400
commitafab2d2999e9c12cf319e1f19da9a0a754560d80 (patch)
treea36a57beddf248af65dc2299f26f5e7c60da3296 /net/8021q
parent8a07eb0a50aebc8c95478d49c28c7f8419a26cef (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')
-rw-r--r--net/8021q/vlan.c15
-rw-r--r--net/8021q/vlan_dev.c4
-rw-r--r--net/8021q/vlanproc.c4
3 files changed, 14 insertions, 9 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 }
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index f247f5bff88d..4225e24d0c21 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -20,6 +20,8 @@
20 * 2 of the License, or (at your option) any later version. 20 * 2 of the License, or (at your option) any later version.
21 */ 21 */
22 22
23#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
24
23#include <linux/module.h> 25#include <linux/module.h>
24#include <linux/slab.h> 26#include <linux/slab.h>
25#include <linux/skbuff.h> 27#include <linux/skbuff.h>
@@ -55,7 +57,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb)
55 return arp_find(veth->h_dest, skb); 57 return arp_find(veth->h_dest, skb);
56#endif 58#endif
57 default: 59 default:
58 pr_debug("%s: unable to resolve type %X addresses.\n", 60 pr_debug("%s: unable to resolve type %X addresses\n",
59 dev->name, ntohs(veth->h_vlan_encapsulated_proto)); 61 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
60 62
61 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN); 63 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index d940c49d168a..016d7f4f1c84 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -17,6 +17,8 @@
17 * Jan 20, 1998 Ben Greear Initial Version 17 * Jan 20, 1998 Ben Greear Initial Version
18 *****************************************************************************/ 18 *****************************************************************************/
19 19
20#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
21
20#include <linux/module.h> 22#include <linux/module.h>
21#include <linux/errno.h> 23#include <linux/errno.h>
22#include <linux/kernel.h> 24#include <linux/kernel.h>
@@ -155,7 +157,7 @@ int __net_init vlan_proc_init(struct net *net)
155 return 0; 157 return 0;
156 158
157err: 159err:
158 pr_err("%s: can't create entry in proc filesystem!\n", __func__); 160 pr_err("can't create entry in proc filesystem!\n");
159 vlan_proc_cleanup(net); 161 vlan_proc_cleanup(net);
160 return -ENOBUFS; 162 return -ENOBUFS;
161} 163}