[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd748d24-7eef-d3b5-7ed0-07c4a40906aa@gmail.com>
Date: Sat, 4 Jan 2020 12:06:42 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: "Enrico Weigelt, metux IT consult" <info@...ux.net>,
linux-kernel@...r.kernel.org
Cc: davem@...emloft.net, mareklindner@...mailbox.ch,
sw@...onwunderlich.de, a@...table.cc, sven@...fation.org,
marcel@...tmann.org, johan.hedberg@...il.com,
roopa@...ulusnetworks.com, nikolay@...ulusnetworks.com,
edumazet@...gle.com, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
jon.maloy@...csson.com, ying.xue@...driver.com, kafai@...com,
songliubraving@...com, yhs@...com, andriin@...com,
netdev@...r.kernel.org, linux-bluetooth@...r.kernel.org,
tipc-discussion@...ts.sourceforge.net,
linux-hyperv@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH 2/8] net: 8021q: use netdev_info()/netdev_warn()
On 1/4/2020 11:51 AM, Enrico Weigelt, metux IT consult wrote:
> Use netdev_info() / netdev_warn() instead of pr_info() / pr_warn()
> for more consistent log output.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
> ---
> net/8021q/vlan.c | 4 ++--
> net/8021q/vlan_core.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
> index ded7bf7229cf..7f18c8406ff8 100644
> --- a/net/8021q/vlan.c
> +++ b/net/8021q/vlan.c
> @@ -123,7 +123,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);
Since we use netdev_info which does internally use net_device::name for
printing, the name argument is now redundant.
> NL_SET_ERR_MSG_MOD(extack, "VLANs not supported on device");
> return -EOPNOTSUPP;
> }
> @@ -376,7 +376,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);
Likewise.
> vlan_vid_add(dev, htons(ETH_P_8021Q), 0);
> }
> diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
> index a313165e7a67..bc32b33e0da8 100644
> --- a/net/8021q/vlan_core.c
> +++ b/net/8021q/vlan_core.c
> @@ -360,7 +360,7 @@ static void __vlan_vid_del(struct vlan_info *vlan_info,
>
> err = vlan_kill_rx_filter_info(dev, proto, vid);
> if (err)
> - pr_warn("failed to kill vid %04x/%d for device %s\n",
> + netdev_warn(dev, "failed to kill vid %04x/%d for device %s\n",
> proto, vid, dev->name);
And here as well.
--
Florian
Powered by blists - more mailing lists