mirror of https://gitee.com/openkylin/linux.git
net: ethernet: ti: cpsw: remove priv from cpsw_get_slave_port() parameters list
There is no need in priv here. Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0a440f8f4f
commit
6f1f58361f
|
@ -525,7 +525,7 @@ static const struct cpsw_stats cpsw_gstrings_stats[] = {
|
||||||
if (priv->data.dual_emac) { \
|
if (priv->data.dual_emac) { \
|
||||||
struct cpsw_slave *slave = priv->slaves + \
|
struct cpsw_slave *slave = priv->slaves + \
|
||||||
priv->emac_port; \
|
priv->emac_port; \
|
||||||
int slave_port = cpsw_get_slave_port(priv, \
|
int slave_port = cpsw_get_slave_port( \
|
||||||
slave->slave_num); \
|
slave->slave_num); \
|
||||||
cpsw_ale_add_mcast(priv->ale, addr, \
|
cpsw_ale_add_mcast(priv->ale, addr, \
|
||||||
1 << slave_port | ALE_PORT_HOST, \
|
1 << slave_port | ALE_PORT_HOST, \
|
||||||
|
@ -537,7 +537,7 @@ static const struct cpsw_stats cpsw_gstrings_stats[] = {
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static inline int cpsw_get_slave_port(struct cpsw_priv *priv, u32 slave_num)
|
static inline int cpsw_get_slave_port(u32 slave_num)
|
||||||
{
|
{
|
||||||
return slave_num + 1;
|
return slave_num + 1;
|
||||||
}
|
}
|
||||||
|
@ -847,7 +847,7 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,
|
||||||
if (!phy)
|
if (!phy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
slave_port = cpsw_get_slave_port(priv, slave->slave_num);
|
slave_port = cpsw_get_slave_port(slave->slave_num);
|
||||||
|
|
||||||
if (phy->link) {
|
if (phy->link) {
|
||||||
mac_control = priv->data.mac_control;
|
mac_control = priv->data.mac_control;
|
||||||
|
@ -1118,7 +1118,7 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
|
||||||
|
|
||||||
slave->mac_control = 0; /* no link yet */
|
slave->mac_control = 0; /* no link yet */
|
||||||
|
|
||||||
slave_port = cpsw_get_slave_port(priv, slave->slave_num);
|
slave_port = cpsw_get_slave_port(slave->slave_num);
|
||||||
|
|
||||||
if (priv->data.dual_emac)
|
if (priv->data.dual_emac)
|
||||||
cpsw_add_dual_emac_def_ale_entries(priv, slave, slave_port);
|
cpsw_add_dual_emac_def_ale_entries(priv, slave, slave_port);
|
||||||
|
@ -1220,7 +1220,7 @@ static void cpsw_slave_stop(struct cpsw_slave *slave, struct cpsw_priv *priv)
|
||||||
{
|
{
|
||||||
u32 slave_port;
|
u32 slave_port;
|
||||||
|
|
||||||
slave_port = cpsw_get_slave_port(priv, slave->slave_num);
|
slave_port = cpsw_get_slave_port(slave->slave_num);
|
||||||
|
|
||||||
if (!slave->phy)
|
if (!slave->phy)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue