net: mvneta: replace magic numbers by existing macros
authorDmitri Epshtein <dima@marvell.com>
Sat, 12 Mar 2016 17:44:20 +0000 (18:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2016 19:48:52 +0000 (15:48 -0400)
Some literal values are actually already defined by macros, so let's use
them.

[gregory.clement@free-electrons.com: split intial commit in two
individual changes]
Signed-off-by: Dmitri Epshtein <dima@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c

index 1af60bd..577f7ca 100644 (file)
@@ -1114,7 +1114,7 @@ static void mvneta_port_down(struct mvneta_port *pp)
                mdelay(1);
 
                val = mvreg_read(pp, MVNETA_RXQ_CMD);
-       } while (val & 0xff);
+       } while (val & MVNETA_RXQ_ENABLE_MASK);
 
        /* Stop Tx port activity. Check port Tx activity. Issue stop
         * command for active channels only
@@ -1139,7 +1139,7 @@ static void mvneta_port_down(struct mvneta_port *pp)
                /* Check TX Command reg that all Txqs are stopped */
                val = mvreg_read(pp, MVNETA_TXQ_CMD);
 
-       } while (val & 0xff);
+       } while (val & MVNETA_TXQ_ENABLE_MASK);
 
        /* Double check to verify that TX FIFO is empty */
        count = 0;