Commit c81a97b5 authored by Srikanth Thokala's avatar Srikanth Thokala Committed by David S. Miller

net: axienet: Removed coding style errors and warnings

Removed checkpatch.pl errors and warnings.
Signed-off-by: default avatarSrikanth Thokala <sthokal@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7cc3163
...@@ -444,8 +444,8 @@ static void __axienet_device_reset(struct axienet_local *lp, ...@@ -444,8 +444,8 @@ static void __axienet_device_reset(struct axienet_local *lp,
while (axienet_dma_in32(lp, offset) & XAXIDMA_CR_RESET_MASK) { while (axienet_dma_in32(lp, offset) & XAXIDMA_CR_RESET_MASK) {
udelay(1); udelay(1);
if (--timeout == 0) { if (--timeout == 0) {
dev_err(dev, "axienet_device_reset DMA " netdev_err(lp->ndev, "%s: DMA reset timeout!\n",
"reset timeout!\n"); __func__);
break; break;
} }
} }
...@@ -484,8 +484,8 @@ static void axienet_device_reset(struct net_device *ndev) ...@@ -484,8 +484,8 @@ static void axienet_device_reset(struct net_device *ndev)
} }
if (axienet_dma_bd_init(ndev)) { if (axienet_dma_bd_init(ndev)) {
dev_err(&ndev->dev, "axienet_device_reset descriptor " netdev_err(ndev, "%s: descriptor allocation failed\n",
"allocation failed\n"); __func__);
} }
axienet_status = axienet_ior(lp, XAE_RCW1_OFFSET); axienet_status = axienet_ior(lp, XAE_RCW1_OFFSET);
...@@ -560,8 +560,8 @@ static void axienet_adjust_link(struct net_device *ndev) ...@@ -560,8 +560,8 @@ static void axienet_adjust_link(struct net_device *ndev)
lp->last_link = link_state; lp->last_link = link_state;
phy_print_status(phy); phy_print_status(phy);
} else { } else {
dev_err(&ndev->dev, "Error setting Axi Ethernet " netdev_err(ndev,
"mac speed\n"); "Error setting Axi Ethernet mac speed\n");
} }
} }
} }
...@@ -1238,8 +1238,8 @@ axienet_ethtools_set_pauseparam(struct net_device *ndev, ...@@ -1238,8 +1238,8 @@ axienet_ethtools_set_pauseparam(struct net_device *ndev,
struct axienet_local *lp = netdev_priv(ndev); struct axienet_local *lp = netdev_priv(ndev);
if (netif_running(ndev)) { if (netif_running(ndev)) {
printk(KERN_ERR "%s: Please stop netif before applying " netdev_err(ndev,
"configruation\n", ndev->name); "Please stop netif before applying configuration\n");
return -EFAULT; return -EFAULT;
} }
...@@ -1295,8 +1295,8 @@ static int axienet_ethtools_set_coalesce(struct net_device *ndev, ...@@ -1295,8 +1295,8 @@ static int axienet_ethtools_set_coalesce(struct net_device *ndev,
struct axienet_local *lp = netdev_priv(ndev); struct axienet_local *lp = netdev_priv(ndev);
if (netif_running(ndev)) { if (netif_running(ndev)) {
printk(KERN_ERR "%s: Please stop netif before applying " netdev_err(ndev,
"configruation\n", ndev->name); "Please stop netif before applying configuration\n");
return -EFAULT; return -EFAULT;
} }
......
...@@ -161,19 +161,19 @@ int axienet_mdio_setup(struct axienet_local *lp, struct device_node *np) ...@@ -161,19 +161,19 @@ int axienet_mdio_setup(struct axienet_local *lp, struct device_node *np)
np1 = of_find_node_by_name(NULL, "cpu"); np1 = of_find_node_by_name(NULL, "cpu");
if (!np1) { if (!np1) {
printk(KERN_WARNING "%s(): Could not find CPU device node.", netdev_warn(lp->ndev, "Could not find CPU device node.\n");
__func__); netdev_warn(lp->ndev,
printk(KERN_WARNING "Setting MDIO clock divisor to " "Setting MDIO clock divisor to default %d\n",
"default %d\n", DEFAULT_CLOCK_DIVISOR); DEFAULT_CLOCK_DIVISOR);
clk_div = DEFAULT_CLOCK_DIVISOR; clk_div = DEFAULT_CLOCK_DIVISOR;
goto issue; goto issue;
} }
property_p = (u32 *) of_get_property(np1, "clock-frequency", NULL); property_p = (u32 *) of_get_property(np1, "clock-frequency", NULL);
if (!property_p) { if (!property_p) {
printk(KERN_WARNING "%s(): Could not find CPU property: " netdev_warn(lp->ndev, "clock-frequency property not found.\n");
"clock-frequency.", __func__); netdev_warn(lp->ndev,
printk(KERN_WARNING "Setting MDIO clock divisor to " "Setting MDIO clock divisor to default %d\n",
"default %d\n", DEFAULT_CLOCK_DIVISOR); DEFAULT_CLOCK_DIVISOR);
clk_div = DEFAULT_CLOCK_DIVISOR; clk_div = DEFAULT_CLOCK_DIVISOR;
of_node_put(np1); of_node_put(np1);
goto issue; goto issue;
...@@ -187,8 +187,9 @@ int axienet_mdio_setup(struct axienet_local *lp, struct device_node *np) ...@@ -187,8 +187,9 @@ int axienet_mdio_setup(struct axienet_local *lp, struct device_node *np)
if (host_clock % (MAX_MDIO_FREQ * 2)) if (host_clock % (MAX_MDIO_FREQ * 2))
clk_div++; clk_div++;
printk(KERN_DEBUG "%s(): Setting MDIO clock divisor to %u based " netdev_dbg(lp->ndev,
"on %u Hz host clock.\n", __func__, clk_div, host_clock); "Setting MDIO clock divisor to %u/%u Hz host clock.\n",
clk_div, host_clock);
of_node_put(np1); of_node_put(np1);
issue: issue:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment