USB: ipheth.c: remove err() usage
err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
50c627c9c3
commit
495f71e2b9
1 changed files with 21 additions and 13 deletions
|
@ -209,7 +209,8 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
err("%s: urb status: %d", __func__, status);
|
dev_err(&dev->intf->dev, "%s: urb status: %d\n",
|
||||||
|
__func__, status);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +223,8 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
||||||
|
|
||||||
skb = dev_alloc_skb(len);
|
skb = dev_alloc_skb(len);
|
||||||
if (!skb) {
|
if (!skb) {
|
||||||
err("%s: dev_alloc_skb: -ENOMEM", __func__);
|
dev_err(&dev->intf->dev, "%s: dev_alloc_skb: -ENOMEM\n",
|
||||||
|
__func__);
|
||||||
dev->net->stats.rx_dropped++;
|
dev->net->stats.rx_dropped++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -251,7 +253,8 @@ static void ipheth_sndbulk_callback(struct urb *urb)
|
||||||
status != -ENOENT &&
|
status != -ENOENT &&
|
||||||
status != -ECONNRESET &&
|
status != -ECONNRESET &&
|
||||||
status != -ESHUTDOWN)
|
status != -ESHUTDOWN)
|
||||||
err("%s: urb status: %d", __func__, status);
|
dev_err(&dev->intf->dev, "%s: urb status: %d\n",
|
||||||
|
__func__, status);
|
||||||
|
|
||||||
dev_kfree_skb_irq(dev->tx_skb);
|
dev_kfree_skb_irq(dev->tx_skb);
|
||||||
netif_wake_queue(dev->net);
|
netif_wake_queue(dev->net);
|
||||||
|
@ -271,7 +274,8 @@ static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||||
dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE,
|
dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE,
|
||||||
IPHETH_CTRL_TIMEOUT);
|
IPHETH_CTRL_TIMEOUT);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
err("%s: usb_control_msg: %d", __func__, retval);
|
dev_err(&dev->intf->dev, "%s: usb_control_msg: %d\n",
|
||||||
|
__func__, retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,9 +312,11 @@ static int ipheth_get_macaddr(struct ipheth_device *dev)
|
||||||
IPHETH_CTRL_BUF_SIZE,
|
IPHETH_CTRL_BUF_SIZE,
|
||||||
IPHETH_CTRL_TIMEOUT);
|
IPHETH_CTRL_TIMEOUT);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
err("%s: usb_control_msg: %d", __func__, retval);
|
dev_err(&dev->intf->dev, "%s: usb_control_msg: %d\n",
|
||||||
|
__func__, retval);
|
||||||
} else if (retval < ETH_ALEN) {
|
} else if (retval < ETH_ALEN) {
|
||||||
err("%s: usb_control_msg: short packet: %d bytes",
|
dev_err(&dev->intf->dev,
|
||||||
|
"%s: usb_control_msg: short packet: %d bytes\n",
|
||||||
__func__, retval);
|
__func__, retval);
|
||||||
retval = -EINVAL;
|
retval = -EINVAL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -335,7 +341,8 @@ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
|
||||||
|
|
||||||
retval = usb_submit_urb(dev->rx_urb, mem_flags);
|
retval = usb_submit_urb(dev->rx_urb, mem_flags);
|
||||||
if (retval)
|
if (retval)
|
||||||
err("%s: usb_submit_urb: %d", __func__, retval);
|
dev_err(&dev->intf->dev, "%s: usb_submit_urb: %d\n",
|
||||||
|
__func__, retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,7 +403,8 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
|
||||||
|
|
||||||
retval = usb_submit_urb(dev->tx_urb, GFP_ATOMIC);
|
retval = usb_submit_urb(dev->tx_urb, GFP_ATOMIC);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
err("%s: usb_submit_urb: %d", __func__, retval);
|
dev_err(&dev->intf->dev, "%s: usb_submit_urb: %d\n",
|
||||||
|
__func__, retval);
|
||||||
dev->net->stats.tx_errors++;
|
dev->net->stats.tx_errors++;
|
||||||
dev_kfree_skb_irq(skb);
|
dev_kfree_skb_irq(skb);
|
||||||
} else {
|
} else {
|
||||||
|
@ -414,7 +422,7 @@ static void ipheth_tx_timeout(struct net_device *net)
|
||||||
{
|
{
|
||||||
struct ipheth_device *dev = netdev_priv(net);
|
struct ipheth_device *dev = netdev_priv(net);
|
||||||
|
|
||||||
err("%s: TX timeout", __func__);
|
dev_err(&dev->intf->dev, "%s: TX timeout\n", __func__);
|
||||||
dev->net->stats.tx_errors++;
|
dev->net->stats.tx_errors++;
|
||||||
usb_unlink_urb(dev->tx_urb);
|
usb_unlink_urb(dev->tx_urb);
|
||||||
}
|
}
|
||||||
|
@ -464,7 +472,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||||
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
|
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
|
||||||
if (hintf == NULL) {
|
if (hintf == NULL) {
|
||||||
retval = -ENODEV;
|
retval = -ENODEV;
|
||||||
err("Unable to find alternate settings interface");
|
dev_err(&intf->dev, "Unable to find alternate settings interface\n");
|
||||||
goto err_endpoints;
|
goto err_endpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,7 +485,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||||
}
|
}
|
||||||
if (!(dev->bulk_in && dev->bulk_out)) {
|
if (!(dev->bulk_in && dev->bulk_out)) {
|
||||||
retval = -ENODEV;
|
retval = -ENODEV;
|
||||||
err("Unable to find endpoints");
|
dev_err(&intf->dev, "Unable to find endpoints\n");
|
||||||
goto err_endpoints;
|
goto err_endpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -495,7 +503,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||||
|
|
||||||
retval = ipheth_alloc_urbs(dev);
|
retval = ipheth_alloc_urbs(dev);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
err("error allocating urbs: %d", retval);
|
dev_err(&intf->dev, "error allocating urbs: %d\n", retval);
|
||||||
goto err_alloc_urbs;
|
goto err_alloc_urbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,7 +514,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||||
|
|
||||||
retval = register_netdev(netdev);
|
retval = register_netdev(netdev);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
err("error registering netdev: %d", retval);
|
dev_err(&intf->dev, "error registering netdev: %d\n", retval);
|
||||||
retval = -EIO;
|
retval = -EIO;
|
||||||
goto err_register_netdev;
|
goto err_register_netdev;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue