linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3]net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version.
@ 2011-05-24  6:43 Justin P. Mattock
  2011-05-26 18:56 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Justin P. Mattock @ 2011-05-24  6:43 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, Justin P. Mattock, Joe Perches, David S. Miller,
	Ben Greear

The below patch removes vlan_buggyright and vlan_copyright from vlan_proto_init, 
so that it prints out just the fullname of vlan and the version number.

before:

[   30.438203] 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
[   30.441542] All bugs added by David S. Miller <davem@redhat.com>

after:

[   31.513910] 802.1Q VLAN Support v1.8

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
CC: Joe Perches <joe@perches.com>
CC: David S. Miller <davem@davemloft.net>
CC: Ben Greear <greearb@candelatech.com>
---
 net/8021q/vlan.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index b2274d1..c7a581a 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -46,8 +46,6 @@ int vlan_net_id __read_mostly;
 
 const char vlan_fullname[] = "802.1Q VLAN Support";
 const char vlan_version[] = DRV_VERSION;
-static const char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
-static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";
 
 /* End of global variables definitions. */
 
@@ -673,8 +671,7 @@ static int __init vlan_proto_init(void)
 {
 	int err;
 
-	pr_info("%s v%s %s\n", vlan_fullname, vlan_version, vlan_copyright);
-	pr_info("All bugs added by %s\n", vlan_buggyright);
+	pr_info("%s v%s\n", vlan_fullname, vlan_version);
 
 	err = register_pernet_subsys(&vlan_net_ops);
 	if (err < 0)
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3]net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version.
  2011-05-24  6:43 [PATCH v3]net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version Justin P. Mattock
@ 2011-05-26 18:56 ` David Miller
  2011-05-26 20:14   ` Justin P. Mattock
  2011-05-26 20:58   ` [PATCH net-next when it opens] net: 8021q: Add pr_fmt Joe Perches
  0 siblings, 2 replies; 5+ messages in thread
From: David Miller @ 2011-05-26 18:56 UTC (permalink / raw)
  To: justinmattock; +Cc: netdev, linux-kernel, joe, greearb

From: "Justin P. Mattock" <justinmattock@gmail.com>
Date: Mon, 23 May 2011 23:43:48 -0700

> The below patch removes vlan_buggyright and vlan_copyright from vlan_proto_init, 
> so that it prints out just the fullname of vlan and the version number.
> 
> before:
> 
> [   30.438203] 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
> [   30.441542] All bugs added by David S. Miller <davem@redhat.com>
> 
> after:
> 
> [   31.513910] 802.1Q VLAN Support v1.8
> 
> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

Applied, thanks Justin.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3]net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version.
  2011-05-26 18:56 ` David Miller
@ 2011-05-26 20:14   ` Justin P. Mattock
  2011-05-26 20:58   ` [PATCH net-next when it opens] net: 8021q: Add pr_fmt Joe Perches
  1 sibling, 0 replies; 5+ messages in thread
From: Justin P. Mattock @ 2011-05-26 20:14 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel, joe, greearb

On 05/26/2011 11:56 AM, David Miller wrote:
> From: "Justin P. Mattock"<justinmattock@gmail.com>
> Date: Mon, 23 May 2011 23:43:48 -0700
>
>> The below patch removes vlan_buggyright and vlan_copyright from vlan_proto_init,
>> so that it prints out just the fullname of vlan and the version number.
>>
>> before:
>>
>> [   30.438203] 802.1Q VLAN Support v1.8 Ben Greear<greearb@candelatech.com>
>> [   30.441542] All bugs added by David S. Miller<davem@redhat.com>
>>
>> after:
>>
>> [   31.513910] 802.1Q VLAN Support v1.8
>>
>> Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>
> Applied, thanks Justin.
>

cool..

Justin P. Mattock

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next when it opens] net: 8021q: Add pr_fmt
  2011-05-26 18:56 ` David Miller
  2011-05-26 20:14   ` Justin P. Mattock
@ 2011-05-26 20:58   ` Joe Perches
  2011-06-02 21:03     ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2011-05-26 20:58 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Ben Greear, David S. Miller, netdev, linux-kernel

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>
---
 net/8021q/vlan.c     |   15 ++++++++-------
 net/8021q/vlan_dev.c |    4 +++-
 net/8021q/vlanproc.c |    4 +++-
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index c7a581a..cfa9afe 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -18,6 +18,8 @@
  *		2 of the License, or (at your option) any later version.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
@@ -149,13 +151,13 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id)
 	const struct net_device_ops *ops = real_dev->netdev_ops;
 
 	if (real_dev->features & NETIF_F_VLAN_CHALLENGED) {
-		pr_info("8021q: VLANs not supported on %s\n", name);
+		pr_info("VLANs not supported on %s\n", name);
 		return -EOPNOTSUPP;
 	}
 
 	if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) &&
 	    (!ops->ndo_vlan_rx_add_vid || !ops->ndo_vlan_rx_kill_vid)) {
-		pr_info("8021q: Device %s has buggy VLAN hw accel\n", name);
+		pr_info("Device %s has buggy VLAN hw accel\n", name);
 		return -EOPNOTSUPP;
 	}
 
@@ -344,13 +346,12 @@ static void __vlan_device_event(struct net_device *dev, unsigned long event)
 	case NETDEV_CHANGENAME:
 		vlan_proc_rem_dev(dev);
 		if (vlan_proc_add_dev(dev) < 0)
-			pr_warning("8021q: failed to change proc name for %s\n",
-					dev->name);
+			pr_warn("failed to change proc name for %s\n",
+				dev->name);
 		break;
 	case NETDEV_REGISTER:
 		if (vlan_proc_add_dev(dev) < 0)
-			pr_warning("8021q: failed to add proc entry for %s\n",
-					dev->name);
+			pr_warn("failed to add proc entry for %s\n", dev->name);
 		break;
 	case NETDEV_UNREGISTER:
 		vlan_proc_rem_dev(dev);
@@ -374,7 +375,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
 	if ((event == NETDEV_UP) &&
 	    (dev->features & NETIF_F_HW_VLAN_FILTER) &&
 	    dev->netdev_ops->ndo_vlan_rx_add_vid) {
-		pr_info("8021q: adding VLAN 0 to HW filter on device %s\n",
+		pr_info("adding VLAN 0 to HW filter on device %s\n",
 			dev->name);
 		dev->netdev_ops->ndo_vlan_rx_add_vid(dev, 0);
 	}
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index f247f5b..4225e24 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -20,6 +20,8 @@
  *		2 of the License, or (at your option) any later version.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/skbuff.h>
@@ -55,7 +57,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb)
 		return arp_find(veth->h_dest, skb);
 #endif
 	default:
-		pr_debug("%s: unable to resolve type %X addresses.\n",
+		pr_debug("%s: unable to resolve type %X addresses\n",
 			 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
 
 		memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index d940c49..016d7f4 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -17,6 +17,8 @@
  * Jan 20, 1998        Ben Greear     Initial Version
  *****************************************************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
@@ -155,7 +157,7 @@ int __net_init vlan_proc_init(struct net *net)
 	return 0;
 
 err:
-	pr_err("%s: can't create entry in proc filesystem!\n", __func__);
+	pr_err("can't create entry in proc filesystem!\n");
 	vlan_proc_cleanup(net);
 	return -ENOBUFS;
 }
-- 
1.7.5.rc3.dirty


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next when it opens] net: 8021q: Add pr_fmt
  2011-05-26 20:58   ` [PATCH net-next when it opens] net: 8021q: Add pr_fmt Joe Perches
@ 2011-06-02 21:03     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2011-06-02 21:03 UTC (permalink / raw)
  To: joe; +Cc: kaber, greearb, netdev, linux-kernel

From: Joe Perches <joe@perches.com>
Date: Thu, 26 May 2011 13:58:31 -0700

> 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>

I'll apply this, thanks Joe.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-02 21:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24  6:43 [PATCH v3]net:8021q:vlan.c Fix pr_info to just give the vlan fullname and version Justin P. Mattock
2011-05-26 18:56 ` David Miller
2011-05-26 20:14   ` Justin P. Mattock
2011-05-26 20:58   ` [PATCH net-next when it opens] net: 8021q: Add pr_fmt Joe Perches
2011-06-02 21:03     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).