Commit afab2d2999e9c12cf319e1f19da9a0a754560d80

Authored by Joe Perches
Committed by David S. Miller
1 parent 8a07eb0a50

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>

Showing 3 changed files with 14 additions and 9 deletions Side-by-side Diff

... ... @@ -18,6 +18,8 @@
18 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 23 #include <linux/capability.h>
22 24 #include <linux/module.h>
23 25 #include <linux/netdevice.h>
24 26  
... ... @@ -149,13 +151,13 @@
149 151 const struct net_device_ops *ops = real_dev->netdev_ops;
150 152  
151 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 155 return -EOPNOTSUPP;
154 156 }
155 157  
156 158 if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) &&
157 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 161 return -EOPNOTSUPP;
160 162 }
161 163  
162 164  
... ... @@ -344,13 +346,12 @@
344 346 case NETDEV_CHANGENAME:
345 347 vlan_proc_rem_dev(dev);
346 348 if (vlan_proc_add_dev(dev) < 0)
347   - pr_warning("8021q: failed to change proc name for %s\n",
348   - dev->name);
  349 + pr_warn("failed to change proc name for %s\n",
  350 + dev->name);
349 351 break;
350 352 case NETDEV_REGISTER:
351 353 if (vlan_proc_add_dev(dev) < 0)
352   - pr_warning("8021q: failed to add proc entry for %s\n",
353   - dev->name);
  354 + pr_warn("failed to add proc entry for %s\n", dev->name);
354 355 break;
355 356 case NETDEV_UNREGISTER:
356 357 vlan_proc_rem_dev(dev);
... ... @@ -374,7 +375,7 @@
374 375 if ((event == NETDEV_UP) &&
375 376 (dev->features & NETIF_F_HW_VLAN_FILTER) &&
376 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 379 dev->name);
379 380 dev->netdev_ops->ndo_vlan_rx_add_vid(dev, 0);
380 381 }
net/8021q/vlan_dev.c
... ... @@ -20,6 +20,8 @@
20 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 25 #include <linux/module.h>
24 26 #include <linux/slab.h>
25 27 #include <linux/skbuff.h>
... ... @@ -55,7 +57,7 @@
55 57 return arp_find(veth->h_dest, skb);
56 58 #endif
57 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 61 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
60 62  
61 63 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
net/8021q/vlanproc.c
... ... @@ -17,6 +17,8 @@
17 17 * Jan 20, 1998 Ben Greear Initial Version
18 18 *****************************************************************************/
19 19  
  20 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  21 +
20 22 #include <linux/module.h>
21 23 #include <linux/errno.h>
22 24 #include <linux/kernel.h>
... ... @@ -155,7 +157,7 @@
155 157 return 0;
156 158  
157 159 err:
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 161 vlan_proc_cleanup(net);
160 162 return -ENOBUFS;
161 163 }