net: axienet: Removed coding style errors and warnings
authorSrikanth Thokala <srikanth.thokala@xilinx.com>
Tue, 5 May 2015 09:25:59 +0000 (11:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 May 2015 23:33:58 +0000 (19:33 -0400)
Removed checkpatch.pl errors and warnings.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c

index c6f2ba0..39bb2e9 100644 (file)
@@ -444,8 +444,8 @@ static void __axienet_device_reset(struct axienet_local *lp,
        while (axienet_dma_in32(lp, offset) & XAXIDMA_CR_RESET_MASK) {
                udelay(1);
                if (--timeout == 0) {
-                       dev_err(dev, "axienet_device_reset DMA "
-                               "reset timeout!\n");
+                       netdev_err(lp->ndev, "%s: DMA reset timeout!\n",
+                                  __func__);
                        break;
                }
        }
@@ -484,8 +484,8 @@ static void axienet_device_reset(struct net_device *ndev)
        }
 
        if (axienet_dma_bd_init(ndev)) {
-               dev_err(&ndev->dev, "axienet_device_reset descriptor "
-                       "allocation failed\n");
+               netdev_err(ndev, "%s: descriptor allocation failed\n",
+                          __func__);
        }
 
        axienet_status = axienet_ior(lp, XAE_RCW1_OFFSET);
@@ -560,8 +560,8 @@ static void axienet_adjust_link(struct net_device *ndev)
                        lp->last_link = link_state;
                        phy_print_status(phy);
                } else {
-                       dev_err(&ndev->dev, "Error setting Axi Ethernet "
-                               "mac speed\n");
+                       netdev_err(ndev,
+                                  "Error setting Axi Ethernet mac speed\n");
                }
        }
 }
@@ -1238,8 +1238,8 @@ axienet_ethtools_set_pauseparam(struct net_device *ndev,
        struct axienet_local *lp = netdev_priv(ndev);
 
        if (netif_running(ndev)) {
-               printk(KERN_ERR "%s: Please stop netif before applying "
-                      "configruation\n", ndev->name);
+               netdev_err(ndev,
+                          "Please stop netif before applying configuration\n");
                return -EFAULT;
        }
 
@@ -1295,8 +1295,8 @@ static int axienet_ethtools_set_coalesce(struct net_device *ndev,
        struct axienet_local *lp = netdev_priv(ndev);
 
        if (netif_running(ndev)) {
-               printk(KERN_ERR "%s: Please stop netif before applying "
-                      "configruation\n", ndev->name);
+               netdev_err(ndev,
+                          "Please stop netif before applying configuration\n");
                return -EFAULT;
        }
 
index 3b67d60..fce5575 100644 (file)
@@ -161,19 +161,19 @@ int axienet_mdio_setup(struct axienet_local *lp, struct device_node *np)
 
        np1 = of_find_node_by_name(NULL, "cpu");
        if (!np1) {
-               printk(KERN_WARNING "%s(): Could not find CPU device node.",
-                      __func__);
-               printk(KERN_WARNING "Setting MDIO clock divisor to "
-                      "default %d\n", DEFAULT_CLOCK_DIVISOR);
+               netdev_warn(lp->ndev, "Could not find CPU device node.\n");
+               netdev_warn(lp->ndev,
+                           "Setting MDIO clock divisor to default %d\n",
+                           DEFAULT_CLOCK_DIVISOR);
                clk_div = DEFAULT_CLOCK_DIVISOR;
                goto issue;
        }
        property_p = (u32 *) of_get_property(np1, "clock-frequency", NULL);
        if (!property_p) {
-               printk(KERN_WARNING "%s(): Could not find CPU property: "
-                      "clock-frequency.", __func__);
-               printk(KERN_WARNING "Setting MDIO clock divisor to "
-                      "default %d\n", DEFAULT_CLOCK_DIVISOR);
+               netdev_warn(lp->ndev, "clock-frequency property not found.\n");
+               netdev_warn(lp->ndev,
+                           "Setting MDIO clock divisor to default %d\n",
+                           DEFAULT_CLOCK_DIVISOR);
                clk_div = DEFAULT_CLOCK_DIVISOR;
                of_node_put(np1);
                goto issue;
@@ -187,8 +187,9 @@ int axienet_mdio_setup(struct axienet_local *lp, struct device_node *np)
        if (host_clock % (MAX_MDIO_FREQ * 2))
                clk_div++;
 
-       printk(KERN_DEBUG "%s(): Setting MDIO clock divisor to %u based "
-              "on %u Hz host clock.\n", __func__, clk_div, host_clock);
+       netdev_dbg(lp->ndev,
+                  "Setting MDIO clock divisor to %u/%u Hz host clock.\n",
+                  clk_div, host_clock);
 
        of_node_put(np1);
 issue: