Commit 3a694d0c authored by Laura Garcia Liebana's avatar Laura Garcia Liebana Committed by Greg Kroah-Hartman

staging: netlogic: Fix several parentheses alignments

Align arguments with the open parenthesis. Checkpatch found these
issues.
Signed-off-by: default avatarLaura Garcia Liebana <nevola@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3397c1b
......@@ -69,8 +69,7 @@ static inline u32 xlr_nae_rdreg(u32 __iomem *base, unsigned int reg)
return __raw_readl(base + reg);
}
static inline void xlr_reg_update(u32 *base_addr,
u32 off, u32 val, u32 mask)
static inline void xlr_reg_update(u32 *base_addr, u32 off, u32 val, u32 mask)
{
u32 tmp;
......@@ -122,8 +121,8 @@ static inline unsigned char *xlr_alloc_skb(void)
return skb->data;
}
static void xlr_net_fmn_handler(int bkt, int src_stnid, int size,
int code, struct nlm_fmn_msg *msg, void *arg)
static void xlr_net_fmn_handler(int bkt, int src_stnid, int size, int code,
struct nlm_fmn_msg *msg, void *arg)
{
struct sk_buff *skb;
void *skb_data = NULL;
......@@ -406,7 +405,8 @@ static void xlr_stats(struct net_device *ndev, struct rtnl_link_stats64 *stats)
}
static struct rtnl_link_stats64 *xlr_get_stats64(struct net_device *ndev,
struct rtnl_link_stats64 *stats)
struct rtnl_link_stats64 *stats
)
{
xlr_stats(ndev, stats);
return stats;
......@@ -797,13 +797,16 @@ void xlr_set_gmac_speed(struct xlr_net_priv *priv)
if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
if (speed == SPEED_10)
xlr_nae_wreg(priv->base_addr,
R_INTERFACE_CONTROL, SGMII_SPEED_10);
R_INTERFACE_CONTROL,
SGMII_SPEED_10);
if (speed == SPEED_100)
xlr_nae_wreg(priv->base_addr,
R_INTERFACE_CONTROL, SGMII_SPEED_100);
R_INTERFACE_CONTROL,
SGMII_SPEED_100);
if (speed == SPEED_1000)
xlr_nae_wreg(priv->base_addr,
R_INTERFACE_CONTROL, SGMII_SPEED_1000);
R_INTERFACE_CONTROL,
SGMII_SPEED_1000);
}
if (speed == SPEED_10)
xlr_nae_wreg(priv->base_addr, R_CORECONTROL, 0x2);
......@@ -912,14 +915,19 @@ static void xlr_port_enable(struct xlr_net_priv *priv)
if ((prid == 0x8000 || prid == 0x4000 || prid == 0xc000) &&
priv->nd->phy_interface == PHY_INTERFACE_MODE_RGMII)
xlr_reg_update(priv->base_addr, R_RX_CONTROL,
(1 << O_RX_CONTROL__RGMII), (1 << O_RX_CONTROL__RGMII));
(1 << O_RX_CONTROL__RGMII),
(1 << O_RX_CONTROL__RGMII));
/* Rx Tx enable */
xlr_reg_update(priv->base_addr, R_MAC_CONFIG_1,
((1 << O_MAC_CONFIG_1__rxen) | (1 << O_MAC_CONFIG_1__txen) |
(1 << O_MAC_CONFIG_1__rxfc) | (1 << O_MAC_CONFIG_1__txfc)),
((1 << O_MAC_CONFIG_1__rxen) | (1 << O_MAC_CONFIG_1__txen) |
(1 << O_MAC_CONFIG_1__rxfc) | (1 << O_MAC_CONFIG_1__txfc)));
((1 << O_MAC_CONFIG_1__rxen) |
(1 << O_MAC_CONFIG_1__txen) |
(1 << O_MAC_CONFIG_1__rxfc) |
(1 << O_MAC_CONFIG_1__txfc)),
((1 << O_MAC_CONFIG_1__rxen) |
(1 << O_MAC_CONFIG_1__txen) |
(1 << O_MAC_CONFIG_1__rxfc) |
(1 << O_MAC_CONFIG_1__txfc)));
/* Setup tx control reg */
xlr_reg_update(priv->base_addr, R_TX_CONTROL,
......@@ -928,7 +936,8 @@ static void xlr_port_enable(struct xlr_net_priv *priv)
/* Setup rx control reg */
xlr_reg_update(priv->base_addr, R_RX_CONTROL,
1 << O_RX_CONTROL__RxEnable, 1 << O_RX_CONTROL__RxEnable);
1 << O_RX_CONTROL__RxEnable,
1 << O_RX_CONTROL__RxEnable);
}
static void xlr_port_disable(struct xlr_net_priv *priv)
......@@ -936,9 +945,10 @@ static void xlr_port_disable(struct xlr_net_priv *priv)
/* Setup MAC_CONFIG reg */
/* Rx Tx disable*/
xlr_reg_update(priv->base_addr, R_MAC_CONFIG_1,
((1 << O_MAC_CONFIG_1__rxen) | (1 << O_MAC_CONFIG_1__txen) |
(1 << O_MAC_CONFIG_1__rxfc) | (1 << O_MAC_CONFIG_1__txfc)),
0x0);
((1 << O_MAC_CONFIG_1__rxen) |
(1 << O_MAC_CONFIG_1__txen) |
(1 << O_MAC_CONFIG_1__rxfc) |
(1 << O_MAC_CONFIG_1__txfc)), 0x0);
/* Setup tx control reg */
xlr_reg_update(priv->base_addr, R_TX_CONTROL,
......@@ -963,9 +973,9 @@ static int xlr_gmac_init(struct xlr_net_priv *priv,
xlr_port_disable(priv);
xlr_nae_wreg(priv->base_addr, R_DESC_PACK_CTRL,
(1 << O_DESC_PACK_CTRL__MaxEntry)
| (BYTE_OFFSET << O_DESC_PACK_CTRL__ByteOffset)
| (1600 << O_DESC_PACK_CTRL__RegularSize));
(1 << O_DESC_PACK_CTRL__MaxEntry) |
(BYTE_OFFSET << O_DESC_PACK_CTRL__ByteOffset) |
(1600 << O_DESC_PACK_CTRL__RegularSize));
ret = xlr_setup_mdio(priv, pdev);
if (ret)
......@@ -977,21 +987,14 @@ static int xlr_gmac_init(struct xlr_net_priv *priv,
/* speed 2.5Mhz */
xlr_nae_wreg(priv->base_addr, R_CORECONTROL, 0x02);
/* Setup Interrupt mask reg */
xlr_nae_wreg(priv->base_addr, R_INTMASK,
(1 << O_INTMASK__TxIllegal) |
(1 << O_INTMASK__MDInt) |
(1 << O_INTMASK__TxFetchError) |
(1 << O_INTMASK__P2PSpillEcc) |
(1 << O_INTMASK__TagFull) |
(1 << O_INTMASK__Underrun) |
(1 << O_INTMASK__Abort)
);
xlr_nae_wreg(priv->base_addr, R_INTMASK, (1 << O_INTMASK__TxIllegal) |
(1 << O_INTMASK__MDInt) | (1 << O_INTMASK__TxFetchError) |
(1 << O_INTMASK__P2PSpillEcc) | (1 << O_INTMASK__TagFull) |
(1 << O_INTMASK__Underrun) | (1 << O_INTMASK__Abort));
/* Clear all stats */
xlr_reg_update(priv->base_addr, R_STATCTRL,
0, 1 << O_STATCTRL__ClrCnt);
xlr_reg_update(priv->base_addr, R_STATCTRL, 1 << 2,
1 << 2);
xlr_reg_update(priv->base_addr, R_STATCTRL, 0, 1 << O_STATCTRL__ClrCnt);
xlr_reg_update(priv->base_addr, R_STATCTRL, 1 << 2, 1 << 2);
return 0;
}
......
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