mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-30 16:13:54 +08:00
staging: silicom : remove assignment in if condition
This patch removes the assignment in if conditions to do away with the checkpatch warning :'do not use assignment in if condition'. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ee3a636674
commit
338d1ad1ad
@ -2306,11 +2306,10 @@ static int set_tx(struct bpctl_dev *pbpctl_dev, int tx_state)
|
|||||||
if (PEG5_IF_SERIES(pbpctl_dev->subdevice)) {
|
if (PEG5_IF_SERIES(pbpctl_dev->subdevice)) {
|
||||||
if (tx_state) {
|
if (tx_state) {
|
||||||
uint16_t mii_reg;
|
uint16_t mii_reg;
|
||||||
if (!
|
ret = bp75_read_phy_reg(pbpctl_dev,
|
||||||
(ret =
|
BPCTLI_PHY_CONTROL,
|
||||||
bp75_read_phy_reg(pbpctl_dev,
|
&mii_reg);
|
||||||
BPCTLI_PHY_CONTROL,
|
if (!ret) {
|
||||||
&mii_reg))) {
|
|
||||||
if (mii_reg & BPCTLI_MII_CR_POWER_DOWN) {
|
if (mii_reg & BPCTLI_MII_CR_POWER_DOWN) {
|
||||||
ret =
|
ret =
|
||||||
bp75_write_phy_reg
|
bp75_write_phy_reg
|
||||||
@ -2322,17 +2321,15 @@ static int set_tx(struct bpctl_dev *pbpctl_dev, int tx_state)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uint16_t mii_reg;
|
uint16_t mii_reg;
|
||||||
if (!
|
ret = bp75_read_phy_reg(pbpctl_dev,
|
||||||
(ret =
|
BPCTLI_PHY_CONTROL,
|
||||||
bp75_read_phy_reg(pbpctl_dev,
|
&mii_reg);
|
||||||
BPCTLI_PHY_CONTROL,
|
if (!ret) {
|
||||||
&mii_reg))) {
|
|
||||||
|
|
||||||
mii_reg |= BPCTLI_MII_CR_POWER_DOWN;
|
mii_reg |= BPCTLI_MII_CR_POWER_DOWN;
|
||||||
ret =
|
ret = bp75_write_phy_reg(pbpctl_dev,
|
||||||
bp75_write_phy_reg(pbpctl_dev,
|
BPCTLI_PHY_CONTROL,
|
||||||
BPCTLI_PHY_CONTROL,
|
mii_reg);
|
||||||
mii_reg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user