Skip to content

Commit cb5ff33

Browse files
Saurav-Girepunjedavem330
authored andcommitted
cavium: thunder: Fix use true/false for bool type
use true/false on bool type variables for assignment. Signed-off-by: Saurav Girepunje <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5b5168c commit cb5ff33

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/net/ethernet/cavium/thunder/thunder_bgx.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,14 +1007,14 @@ static void bgx_poll_for_link(struct work_struct *work)
10071007

10081008
if ((spu_link & SPU_STATUS1_RCV_LNK) &&
10091009
!(smu_link & SMU_RX_CTL_STATUS)) {
1010-
lmac->link_up = 1;
1010+
lmac->link_up = true;
10111011
if (lmac->lmac_type == BGX_MODE_XLAUI)
10121012
lmac->last_speed = SPEED_40000;
10131013
else
10141014
lmac->last_speed = SPEED_10000;
10151015
lmac->last_duplex = DUPLEX_FULL;
10161016
} else {
1017-
lmac->link_up = 0;
1017+
lmac->link_up = false;
10181018
lmac->last_speed = SPEED_UNKNOWN;
10191019
lmac->last_duplex = DUPLEX_UNKNOWN;
10201020
}
@@ -1023,7 +1023,7 @@ static void bgx_poll_for_link(struct work_struct *work)
10231023
if (lmac->link_up) {
10241024
if (bgx_xaui_check_link(lmac)) {
10251025
/* Errors, clear link_up state */
1026-
lmac->link_up = 0;
1026+
lmac->link_up = false;
10271027
lmac->last_speed = SPEED_UNKNOWN;
10281028
lmac->last_duplex = DUPLEX_UNKNOWN;
10291029
}
@@ -1055,11 +1055,11 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
10551055
if ((lmac->lmac_type == BGX_MODE_SGMII) ||
10561056
(lmac->lmac_type == BGX_MODE_QSGMII) ||
10571057
(lmac->lmac_type == BGX_MODE_RGMII)) {
1058-
lmac->is_sgmii = 1;
1058+
lmac->is_sgmii = true;
10591059
if (bgx_lmac_sgmii_init(bgx, lmac))
10601060
return -1;
10611061
} else {
1062-
lmac->is_sgmii = 0;
1062+
lmac->is_sgmii = false;
10631063
if (bgx_lmac_xaui_init(bgx, lmac))
10641064
return -1;
10651065
}
@@ -1304,7 +1304,7 @@ static void lmac_set_training(struct bgx *bgx, struct lmac *lmac, int lmacid)
13041304
{
13051305
if ((lmac->lmac_type != BGX_MODE_10G_KR) &&
13061306
(lmac->lmac_type != BGX_MODE_40G_KR)) {
1307-
lmac->use_training = 0;
1307+
lmac->use_training = false;
13081308
return;
13091309
}
13101310

0 commit comments

Comments
 (0)