summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpmac.c
diff options
context:
space:
mode:
authorVarka Bhadram <varkab@cdac.in>2014-07-10 11:05:43 +0530
committerDavid S. Miller <davem@davemloft.net>2014-07-10 00:40:37 -0700
commit59329d8bc4c6b52a7f8d146fa782c6346bc409f0 (patch)
tree2ba822e025e99c156506eed904269d4e19b62e92 /drivers/net/ethernet/ti/cpmac.c
parent96a8d3c141f23264281a48917eb2189a1566fda5 (diff)
downloadlinux-59329d8bc4c6b52a7f8d146fa782c6346bc409f0.tar.bz2
net: cpmac: fix missing a blank line after declarations
This patch insert a blank line after declaration Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpmac.c')
-rw-r--r--drivers/net/ethernet/ti/cpmac.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index 1520c190cfd3..3d3ead4a0f6f 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -224,6 +224,7 @@ static void cpmac_dump_regs(struct net_device *dev)
{
int i;
struct cpmac_priv *priv = netdev_priv(dev);
+
for (i = 0; i < CPMAC_REG_END; i += 4) {
if (i % 16 == 0) {
if (i)
@@ -238,6 +239,7 @@ static void cpmac_dump_regs(struct net_device *dev)
static void cpmac_dump_desc(struct net_device *dev, struct cpmac_desc *desc)
{
int i;
+
netdev_dbg(dev, "desc[%p]:", desc);
for (i = 0; i < sizeof(*desc) / 4; i++)
pr_debug(" %08x", ((u32 *)desc)[i]);
@@ -248,6 +250,7 @@ static void cpmac_dump_all_desc(struct net_device *dev)
{
struct cpmac_priv *priv = netdev_priv(dev);
struct cpmac_desc *dump = priv->rx_head;
+
do {
cpmac_dump_desc(dev, dump);
dump = dump->next;
@@ -257,6 +260,7 @@ static void cpmac_dump_all_desc(struct net_device *dev)
static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)
{
int i;
+
netdev_dbg(dev, "skb 0x%p, len=%d\n", skb, skb->len);
for (i = 0; i < skb->len; i++) {
if (i % 16 == 0) {
@@ -681,6 +685,7 @@ static void cpmac_clear_rx(struct net_device *dev)
struct cpmac_priv *priv = netdev_priv(dev);
struct cpmac_desc *desc;
int i;
+
if (unlikely(!priv->rx_head))
return;
desc = priv->rx_head;
@@ -703,6 +708,7 @@ static void cpmac_clear_tx(struct net_device *dev)
{
struct cpmac_priv *priv = netdev_priv(dev);
int i;
+
if (unlikely(!priv->desc_ring))
return;
for (i = 0; i < CPMAC_QUEUES; i++) {
@@ -821,6 +827,7 @@ static void cpmac_tx_timeout(struct net_device *dev)
static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct cpmac_priv *priv = netdev_priv(dev);
+
if (!(netif_running(dev)))
return -EINVAL;
if (!priv->phy)
@@ -1181,6 +1188,7 @@ fail:
static int cpmac_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
+
unregister_netdev(dev);
free_netdev(dev);
return 0;