macvtap: replace printk with netdev_err
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Tue, 29 Nov 2016 03:26:32 +0000 (11:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 17:40:48 +0000 (12:40 -0500)
This patch replaces printk() with netdev_err() for macvtap device.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c

index 5da9861ad79cd0857511d7927f6408740cbd56bd..2513939bf2458d3bbf4f4efb91619c6cedd9207c 100644 (file)
@@ -437,7 +437,7 @@ static int macvtap_get_minor(struct macvlan_dev *vlan)
        if (retval >= 0) {
                vlan->minor = retval;
        } else if (retval == -ENOSPC) {
-               printk(KERN_ERR "too many macvtap devices\n");
+               netdev_err(vlan->dev, "Too many macvtap devices\n");
                retval = -EINVAL;
        }
        mutex_unlock(&minor_lock);