提交 ff32045e 编写于 作者: V Varka Bhadram 提交者: David S. Miller

net: cpmac: fix in debug messages

This patch fix the debug message format. This patch changes to the
commit f160a2d0: net: cpmac: dynamic debug fixes

When we use pr_debug()/netdev_dbg() new lines are inserting in b/w
the values. The format when i use the printk()

These formats used in skb dump and reg dump. This functions
called from the entire code. So this will be enabled all the lines.
Signed-off-by: NVarka Bhadram <varkab@cdac.in>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 51b5bd19
...@@ -228,22 +228,22 @@ static void cpmac_dump_regs(struct net_device *dev) ...@@ -228,22 +228,22 @@ static void cpmac_dump_regs(struct net_device *dev)
for (i = 0; i < CPMAC_REG_END; i += 4) { for (i = 0; i < CPMAC_REG_END; i += 4) {
if (i % 16 == 0) { if (i % 16 == 0) {
if (i) if (i)
pr_cont("\n"); printk("\n");
netdev_dbg(dev, "reg[%p]:", priv->regs + i); printk("%s: reg[%p]:", dev->name, priv->regs + i);
} }
pr_debug(" %08x", cpmac_read(priv->regs, i)); printk(" %08x", cpmac_read(priv->regs, i));
} }
pr_debug("\n"); printk("\n");
} }
static void cpmac_dump_desc(struct net_device *dev, struct cpmac_desc *desc) static void cpmac_dump_desc(struct net_device *dev, struct cpmac_desc *desc)
{ {
int i; int i;
netdev_dbg(dev, "desc[%p]:", desc); printk("%s: desc[%p]:", dev->name, desc);
for (i = 0; i < sizeof(*desc) / 4; i++) for (i = 0; i < sizeof(*desc) / 4; i++)
pr_debug(" %08x", ((u32 *)desc)[i]); printk(" %08x", ((u32 *)desc)[i]);
pr_debug("\n"); printk("\n");
} }
static void cpmac_dump_all_desc(struct net_device *dev) static void cpmac_dump_all_desc(struct net_device *dev)
...@@ -261,16 +261,16 @@ static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb) ...@@ -261,16 +261,16 @@ static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)
{ {
int i; int i;
netdev_dbg(dev, "skb 0x%p, len=%d\n", skb, skb->len); printk("%s: skb 0x%p, len=%d\n", dev->name, skb, skb->len);
for (i = 0; i < skb->len; i++) { for (i = 0; i < skb->len; i++) {
if (i % 16 == 0) { if (i % 16 == 0) {
if (i) if (i)
pr_cont("\n"); printk("\n");
netdev_dbg(dev, "data[%p]:", skb->data + i); printk("%s: data[%p]:", dev->name, skb->data + i);
} }
pr_debug(" %02x", ((u8 *)skb->data)[i]); printk(" %02x", ((u8 *)skb->data)[i]);
} }
pr_debug("\n"); printk("\n");
} }
static int cpmac_mdio_read(struct mii_bus *bus, int phy_id, int reg) static int cpmac_mdio_read(struct mii_bus *bus, int phy_id, int reg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册