Commit ea675ee5 authored by Chad Williamson's avatar Chad Williamson Committed by Greg Kroah-Hartman

Staging: silicom: remove unnecessary braces in bpctl_mod.c

Remove unnecessary braces in bpctl_mod.c, resolving checkpatch.pl
warnings.
Signed-off-by: default avatarChad Williamson <chad@dahc.us>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79931639
...@@ -721,16 +721,15 @@ static int read_pulse(bpctl_dev_t *pbpctl_dev, unsigned int ctrl_ext, ...@@ -721,16 +721,15 @@ static int read_pulse(bpctl_dev_t *pbpctl_dev, unsigned int ctrl_ext,
BP10G_MDIO_DATA_OUT)); BP10G_MDIO_DATA_OUT));
} }
if (pbpctl_dev->bp_10g9) {
ctrl_ext = BP10G_READ_REG(pbpctl_dev, I2CCTL);
} else if ((pbpctl_dev->bp_fiber5) || (pbpctl_dev->bp_i80)) { if (pbpctl_dev->bp_10g9)
ctrl_ext = BP10G_READ_REG(pbpctl_dev, I2CCTL);
else if ((pbpctl_dev->bp_fiber5) || (pbpctl_dev->bp_i80))
ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL); ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL);
} else if (pbpctl_dev->bp_540) { else if (pbpctl_dev->bp_540)
ctrl_ext = BP10G_READ_REG(pbpctl_dev, ESDP); ctrl_ext = BP10G_READ_REG(pbpctl_dev, ESDP);
} else if (pbpctl_dev->bp_10gb) else if (pbpctl_dev->bp_10gb)
ctrl_ext = BP10GB_READ_REG(pbpctl_dev, MISC_REG_SPIO); ctrl_ext = BP10GB_READ_REG(pbpctl_dev, MISC_REG_SPIO);
else if (!pbpctl_dev->bp_10g) else if (!pbpctl_dev->bp_10g)
ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT); ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
else else
...@@ -1921,13 +1920,10 @@ int disc_port_on(bpctl_dev_t *pbpctl_dev) ...@@ -1921,13 +1920,10 @@ int disc_port_on(bpctl_dev_t *pbpctl_dev)
return BP_NOT_CAP; return BP_NOT_CAP;
if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) { if (pbpctl_dev_m->bp_caps_ex & DISC_PORT_CAP_EX) {
if (is_bypass_fn(pbpctl_dev) == 1) { if (is_bypass_fn(pbpctl_dev) == 1)
write_data(pbpctl_dev_m, TX_DISA); write_data(pbpctl_dev_m, TX_DISA);
} else { else
write_data(pbpctl_dev_m, TX_DISB); write_data(pbpctl_dev_m, TX_DISB);
}
msec_delay_bp(LATCH_DELAY); msec_delay_bp(LATCH_DELAY);
...@@ -2018,9 +2014,9 @@ int wdt_off(bpctl_dev_t *pbpctl_dev) ...@@ -2018,9 +2014,9 @@ int wdt_off(bpctl_dev_t *pbpctl_dev)
int ret = BP_NOT_CAP; int ret = BP_NOT_CAP;
if (pbpctl_dev->bp_caps & WD_CTL_CAP) { if (pbpctl_dev->bp_caps & WD_CTL_CAP) {
if (INTEL_IF_SERIES(pbpctl_dev->subdevice)) { if (INTEL_IF_SERIES(pbpctl_dev->subdevice))
bypass_off(pbpctl_dev); bypass_off(pbpctl_dev);
} else if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER) else if (pbpctl_dev->bp_ext_ver >= PXG2BPI_VER)
write_data(pbpctl_dev, WDT_OFF); write_data(pbpctl_dev, WDT_OFF);
else else
data_pulse(pbpctl_dev, WDT_OFF); data_pulse(pbpctl_dev, WDT_OFF);
...@@ -2407,12 +2403,10 @@ static int set_tx(bpctl_dev_t *pbpctl_dev, int tx_state) ...@@ -2407,12 +2403,10 @@ static int set_tx(bpctl_dev_t *pbpctl_dev, int tx_state)
} }
} }
if (pbpctl_dev->bp_fiber5) { if (pbpctl_dev->bp_fiber5)
ctrl = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT); ctrl = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
else if (pbpctl_dev->bp_10gb)
} else if (pbpctl_dev->bp_10gb)
ctrl = BP10GB_READ_REG(pbpctl_dev, MISC_REG_GPIO); ctrl = BP10GB_READ_REG(pbpctl_dev, MISC_REG_GPIO);
else if (!pbpctl_dev->bp_10g) else if (!pbpctl_dev->bp_10g)
ctrl = BPCTL_READ_REG(pbpctl_dev, CTRL); ctrl = BPCTL_READ_REG(pbpctl_dev, CTRL);
else else
...@@ -4057,9 +4051,8 @@ void bypass_caps_init(bpctl_dev_t *pbpctl_dev) ...@@ -4057,9 +4051,8 @@ void bypass_caps_init(bpctl_dev_t *pbpctl_dev)
pbpctl_dev->bp_caps |= pbpctl_dev->bp_caps |=
(TX_CTL_CAP | TX_STATUS_CAP | TPL_CAP); (TX_CTL_CAP | TX_STATUS_CAP | TPL_CAP);
if (TPL_IF_SERIES(pbpctl_dev->subdevice)) { if (TPL_IF_SERIES(pbpctl_dev->subdevice))
pbpctl_dev->bp_caps |= TPL_CAP; pbpctl_dev->bp_caps |= TPL_CAP;
}
if (INTEL_IF_SERIES(pbpctl_dev->subdevice)) { if (INTEL_IF_SERIES(pbpctl_dev->subdevice)) {
pbpctl_dev->bp_caps |= pbpctl_dev->bp_caps |=
...@@ -4199,9 +4192,9 @@ void bypass_caps_init(bpctl_dev_t *pbpctl_dev) ...@@ -4199,9 +4192,9 @@ void bypass_caps_init(bpctl_dev_t *pbpctl_dev)
if (PEG5_IF_SERIES(pbpctl_dev->subdevice)) if (PEG5_IF_SERIES(pbpctl_dev->subdevice))
pbpctl_dev->bp_caps |= (TX_CTL_CAP | TX_STATUS_CAP); pbpctl_dev->bp_caps |= (TX_CTL_CAP | TX_STATUS_CAP);
if (BP10GB_IF_SERIES(pbpctl_dev->subdevice)) { if (BP10GB_IF_SERIES(pbpctl_dev->subdevice))
pbpctl_dev->bp_caps &= ~(TX_CTL_CAP | TX_STATUS_CAP); pbpctl_dev->bp_caps &= ~(TX_CTL_CAP | TX_STATUS_CAP);
}
pbpctl_dev_m = get_master_port_fn(pbpctl_dev); pbpctl_dev_m = get_master_port_fn(pbpctl_dev);
if (pbpctl_dev_m != NULL) { if (pbpctl_dev_m != NULL) {
int cap_reg = 0; int cap_reg = 0;
...@@ -4330,10 +4323,9 @@ int set_bypass_wd_auto(bpctl_dev_t *pbpctl_dev, unsigned int param) ...@@ -4330,10 +4323,9 @@ int set_bypass_wd_auto(bpctl_dev_t *pbpctl_dev, unsigned int param)
int get_bypass_wd_auto(bpctl_dev_t *pbpctl_dev) int get_bypass_wd_auto(bpctl_dev_t *pbpctl_dev)
{ {
if (pbpctl_dev->bp_caps & WD_CTL_CAP)
if (pbpctl_dev->bp_caps & WD_CTL_CAP) {
return pbpctl_dev->reset_time; return pbpctl_dev->reset_time;
}
return BP_NOT_CAP; return BP_NOT_CAP;
} }
...@@ -5039,23 +5031,19 @@ static void bp_tpl_timer_fn(unsigned long param) ...@@ -5039,23 +5031,19 @@ static void bp_tpl_timer_fn(unsigned long param)
link2 = get_bypass_link_status(pbpctl_dev_b); link2 = get_bypass_link_status(pbpctl_dev_b);
if ((link1) && (tx_status(pbpctl_dev))) { if ((link1) && (tx_status(pbpctl_dev))) {
if ((!link2) && (tx_status(pbpctl_dev_b))) { if ((!link2) && (tx_status(pbpctl_dev_b)))
set_tx(pbpctl_dev, 0); set_tx(pbpctl_dev, 0);
} else if (!tx_status(pbpctl_dev_b)) { else if (!tx_status(pbpctl_dev_b))
set_tx(pbpctl_dev_b, 1); set_tx(pbpctl_dev_b, 1);
}
} else if ((!link1) && (tx_status(pbpctl_dev))) { } else if ((!link1) && (tx_status(pbpctl_dev))) {
if ((link2) && (tx_status(pbpctl_dev_b))) { if ((link2) && (tx_status(pbpctl_dev_b)))
set_tx(pbpctl_dev_b, 0); set_tx(pbpctl_dev_b, 0);
}
} else if ((link1) && (!tx_status(pbpctl_dev))) { } else if ((link1) && (!tx_status(pbpctl_dev))) {
if ((link2) && (tx_status(pbpctl_dev_b))) { if ((link2) && (tx_status(pbpctl_dev_b)))
set_tx(pbpctl_dev, 1); set_tx(pbpctl_dev, 1);
}
} else if ((!link1) && (!tx_status(pbpctl_dev))) { } else if ((!link1) && (!tx_status(pbpctl_dev))) {
if ((link2) && (tx_status(pbpctl_dev_b))) { if ((link2) && (tx_status(pbpctl_dev_b)))
set_tx(pbpctl_dev, 1); set_tx(pbpctl_dev, 1);
}
} }
mod_timer(&pbpctl_dev->bp_tpl_timer, jiffies + BP_LINK_MON_DELAY * HZ); mod_timer(&pbpctl_dev->bp_tpl_timer, jiffies + BP_LINK_MON_DELAY * HZ);
...@@ -5114,9 +5102,9 @@ int get_bypass_tpl_auto(bpctl_dev_t *pbpctl_dev) ...@@ -5114,9 +5102,9 @@ int get_bypass_tpl_auto(bpctl_dev_t *pbpctl_dev)
{ {
if (!pbpctl_dev) if (!pbpctl_dev)
return -1; return -1;
if (pbpctl_dev->bp_caps & TPL_CAP) { if (pbpctl_dev->bp_caps & TPL_CAP)
return pbpctl_dev->bp_tpl_flag; return pbpctl_dev->bp_tpl_flag;
}
return BP_NOT_CAP; return BP_NOT_CAP;
} }
......
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