Skip to contentSkip to conversation

net: 8021q: use netdev_info() instead of pr_info()

PATCH In review Enrico Weigelt, metux IT consult 2 participants 2 messages Dec 2, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: 8021q: use netdev_info() instead of pr_info()

Use netdev_info() instead of pr_info() for more consistent log output.

---
 net/8021q/vlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/8021q/vlan.c +2 -2
index f292e0267bb9..d3a6f4ffdaef 100644
@@ -132,7 +132,7 @@ int vlan_check_real_dev(struct net_device *real_dev,
 	const char *name = real_dev->name;
 
 	if (real_dev->features & NETIF_F_VLAN_CHALLENGED) {
-		pr_info("VLANs not supported on %s\n", name);
+		netdev_info(real_dev, "VLANs not supported on %s\n", name);
 		NL_SET_ERR_MSG_MOD(extack, "VLANs not supported on device");
 		return -EOPNOTSUPP;
 	}
@@ -385,7 +385,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
 
 	if ((event == NETDEV_UP) &&
 	    (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER)) {
-		pr_info("adding VLAN 0 to HW filter on device %s\n",
+		netdev_info(dev, "adding VLAN 0 to HW filter on device %s\n",
 			dev->name);
 		vlan_vid_add(dev, htons(ETH_P_8021Q), 0);
 	}
Signature · 1 line
2.11.0
#1 lore raw
Quoted 12 lines · metux IT consult

Use netdev_info() instead of pr_info() for more consistent log output.

---
 net/8021q/vlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/8021q/vlan.c +0 -0
index f292e0267bb9..d3a6f4ffdaef 100644

net/8021q/vlan.c int vlan_check_real_dev(struct net_device *real_dev, · line 135

Quoted 5 lines
net/8021q/vlan.c +1 -1
@@ -132,7 +132,7 @@ int vlan_check_real_dev(struct net_device *real_dev,
 	const char *name = real_dev->name;
 
 	if (real_dev->features & NETIF_F_VLAN_CHALLENGED) {
-		pr_info("VLANs not supported on %s\n", name);
+		netdev_info(real_dev, "VLANs not supported on %s\n", name);

Could you please also remove the real_dev->name string here? netdev_info() should insert it automatically. Same below.

Quoted 13 lines
net/8021q/vlan.c +1 -1
 		NL_SET_ERR_MSG_MOD(extack, "VLANs not supported on device");
 		return -EOPNOTSUPP;
 	}
@@ -385,7 +385,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
 
 	if ((event == NETDEV_UP) &&
 	    (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER)) {
-		pr_info("adding VLAN 0 to HW filter on device %s\n",
+		netdev_info(dev, "adding VLAN 0 to HW filter on device %s\n",
 			dev->name);
 		vlan_vid_add(dev, htons(ETH_P_8021Q), 0);
 	}