generic_hdlc: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate. 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
2903dd654d
commit
12a3bfefc8
@@ -103,9 +103,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type,
|
||||
skb = dev_alloc_skb(sizeof(struct hdlc_header) +
|
||||
sizeof(struct cisco_packet));
|
||||
if (!skb) {
|
||||
printk(KERN_WARNING
|
||||
"%s: Memory squeeze on cisco_keepalive_send()\n",
|
||||
dev->name);
|
||||
netdev_warn(dev, "Memory squeeze on cisco_keepalive_send()\n");
|
||||
return;
|
||||
}
|
||||
skb_reserve(skb, 4);
|
||||
@@ -181,8 +179,8 @@ static int cisco_rx(struct sk_buff *skb)
|
||||
CISCO_PACKET_LEN) &&
|
||||
(skb->len != sizeof(struct hdlc_header) +
|
||||
CISCO_BIG_PACKET_LEN)) {
|
||||
printk(KERN_INFO "%s: Invalid length of Cisco control"
|
||||
" packet (%d bytes)\n", dev->name, skb->len);
|
||||
netdev_info(dev, "Invalid length of Cisco control packet (%d bytes)\n",
|
||||
skb->len);
|
||||
goto rx_error;
|
||||
}
|
||||
|
||||
@@ -217,8 +215,7 @@ static int cisco_rx(struct sk_buff *skb)
|
||||
return NET_RX_SUCCESS;
|
||||
|
||||
case CISCO_ADDR_REPLY:
|
||||
printk(KERN_INFO "%s: Unexpected Cisco IP address "
|
||||
"reply\n", dev->name);
|
||||
netdev_info(dev, "Unexpected Cisco IP address reply\n");
|
||||
goto rx_error;
|
||||
|
||||
case CISCO_KEEPALIVE_REQ:
|
||||
@@ -235,9 +232,8 @@ static int cisco_rx(struct sk_buff *skb)
|
||||
min = sec / 60; sec -= min * 60;
|
||||
hrs = min / 60; min -= hrs * 60;
|
||||
days = hrs / 24; hrs -= days * 24;
|
||||
printk(KERN_INFO "%s: Link up (peer "
|
||||
"uptime %ud%uh%um%us)\n",
|
||||
dev->name, days, hrs, min, sec);
|
||||
netdev_info(dev, "Link up (peer uptime %ud%uh%um%us)\n",
|
||||
days, hrs, min, sec);
|
||||
netif_dormant_off(dev);
|
||||
st->up = 1;
|
||||
}
|
||||
@@ -249,8 +245,7 @@ static int cisco_rx(struct sk_buff *skb)
|
||||
} /* switch (keepalive type) */
|
||||
} /* switch (protocol) */
|
||||
|
||||
printk(KERN_INFO "%s: Unsupported protocol %x\n", dev->name,
|
||||
ntohs(data->protocol));
|
||||
netdev_info(dev, "Unsupported protocol %x\n", ntohs(data->protocol));
|
||||
dev_kfree_skb_any(skb);
|
||||
return NET_RX_DROP;
|
||||
|
||||
@@ -272,7 +267,7 @@ static void cisco_timer(unsigned long arg)
|
||||
if (st->up &&
|
||||
time_after(jiffies, st->last_poll + st->settings.timeout * HZ)) {
|
||||
st->up = 0;
|
||||
printk(KERN_INFO "%s: Link down\n", dev->name);
|
||||
netdev_info(dev, "Link down\n");
|
||||
netif_dormant_on(dev);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user