usbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>
These macros are too similar to the dev_<level> equivalents but take a usbnet * argument. Convert them to the recently introduced netdev_<level> macros and remove the old macros. The old macros had "\n" appended to the format string. Add the "\n" to the converted uses. Some existing uses of the dev<foo> macros in cdc_eem.c probably mistakenly had trailing "\n". No "\n" added there. Fix net1080 this/other log message inversion. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
82456b031e
commit
60b8675592
@@ -340,9 +340,9 @@ EXPORT_SYMBOL_GPL(usbnet_cdc_unbind);
|
||||
static void dumpspeed(struct usbnet *dev, __le32 *speeds)
|
||||
{
|
||||
if (netif_msg_timer(dev))
|
||||
devinfo(dev, "link speeds: %u kbps up, %u kbps down",
|
||||
__le32_to_cpu(speeds[0]) / 1000,
|
||||
__le32_to_cpu(speeds[1]) / 1000);
|
||||
netdev_info(dev->net, "link speeds: %u kbps up, %u kbps down\n",
|
||||
__le32_to_cpu(speeds[0]) / 1000,
|
||||
__le32_to_cpu(speeds[1]) / 1000);
|
||||
}
|
||||
|
||||
static void cdc_status(struct usbnet *dev, struct urb *urb)
|
||||
@@ -362,8 +362,8 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
|
||||
switch (event->bNotificationType) {
|
||||
case USB_CDC_NOTIFY_NETWORK_CONNECTION:
|
||||
if (netif_msg_timer(dev))
|
||||
devdbg(dev, "CDC: carrier %s",
|
||||
event->wValue ? "on" : "off");
|
||||
netdev_dbg(dev->net, "CDC: carrier %s\n",
|
||||
event->wValue ? "on" : "off");
|
||||
if (event->wValue)
|
||||
netif_carrier_on(dev->net);
|
||||
else
|
||||
@@ -371,8 +371,8 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
|
||||
break;
|
||||
case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */
|
||||
if (netif_msg_timer(dev))
|
||||
devdbg(dev, "CDC: speed change (len %d)",
|
||||
urb->actual_length);
|
||||
netdev_dbg(dev->net, "CDC: speed change (len %d)\n",
|
||||
urb->actual_length);
|
||||
if (urb->actual_length != (sizeof *event + 8))
|
||||
set_bit(EVENT_STS_SPLIT, &dev->flags);
|
||||
else
|
||||
@@ -382,8 +382,8 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
|
||||
* but there are no standard formats for the response data.
|
||||
*/
|
||||
default:
|
||||
deverr(dev, "CDC: unexpected notification %02x!",
|
||||
event->bNotificationType);
|
||||
netdev_err(dev->net, "CDC: unexpected notification %02x!\n",
|
||||
event->bNotificationType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user