Commit cb5ff33f authored by Saurav Girepunje's avatar Saurav Girepunje Committed by David S. Miller

cavium: thunder: Fix use true/false for bool type

use true/false on bool type variables for assignment.
Signed-off-by: default avatarSaurav Girepunje <saurav.girepunje@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b5168c7
...@@ -1007,14 +1007,14 @@ static void bgx_poll_for_link(struct work_struct *work) ...@@ -1007,14 +1007,14 @@ static void bgx_poll_for_link(struct work_struct *work)
if ((spu_link & SPU_STATUS1_RCV_LNK) && if ((spu_link & SPU_STATUS1_RCV_LNK) &&
!(smu_link & SMU_RX_CTL_STATUS)) { !(smu_link & SMU_RX_CTL_STATUS)) {
lmac->link_up = 1; lmac->link_up = true;
if (lmac->lmac_type == BGX_MODE_XLAUI) if (lmac->lmac_type == BGX_MODE_XLAUI)
lmac->last_speed = SPEED_40000; lmac->last_speed = SPEED_40000;
else else
lmac->last_speed = SPEED_10000; lmac->last_speed = SPEED_10000;
lmac->last_duplex = DUPLEX_FULL; lmac->last_duplex = DUPLEX_FULL;
} else { } else {
lmac->link_up = 0; lmac->link_up = false;
lmac->last_speed = SPEED_UNKNOWN; lmac->last_speed = SPEED_UNKNOWN;
lmac->last_duplex = DUPLEX_UNKNOWN; lmac->last_duplex = DUPLEX_UNKNOWN;
} }
...@@ -1023,7 +1023,7 @@ static void bgx_poll_for_link(struct work_struct *work) ...@@ -1023,7 +1023,7 @@ static void bgx_poll_for_link(struct work_struct *work)
if (lmac->link_up) { if (lmac->link_up) {
if (bgx_xaui_check_link(lmac)) { if (bgx_xaui_check_link(lmac)) {
/* Errors, clear link_up state */ /* Errors, clear link_up state */
lmac->link_up = 0; lmac->link_up = false;
lmac->last_speed = SPEED_UNKNOWN; lmac->last_speed = SPEED_UNKNOWN;
lmac->last_duplex = DUPLEX_UNKNOWN; lmac->last_duplex = DUPLEX_UNKNOWN;
} }
...@@ -1055,11 +1055,11 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid) ...@@ -1055,11 +1055,11 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
if ((lmac->lmac_type == BGX_MODE_SGMII) || if ((lmac->lmac_type == BGX_MODE_SGMII) ||
(lmac->lmac_type == BGX_MODE_QSGMII) || (lmac->lmac_type == BGX_MODE_QSGMII) ||
(lmac->lmac_type == BGX_MODE_RGMII)) { (lmac->lmac_type == BGX_MODE_RGMII)) {
lmac->is_sgmii = 1; lmac->is_sgmii = true;
if (bgx_lmac_sgmii_init(bgx, lmac)) if (bgx_lmac_sgmii_init(bgx, lmac))
return -1; return -1;
} else { } else {
lmac->is_sgmii = 0; lmac->is_sgmii = false;
if (bgx_lmac_xaui_init(bgx, lmac)) if (bgx_lmac_xaui_init(bgx, lmac))
return -1; return -1;
} }
...@@ -1304,7 +1304,7 @@ static void lmac_set_training(struct bgx *bgx, struct lmac *lmac, int lmacid) ...@@ -1304,7 +1304,7 @@ static void lmac_set_training(struct bgx *bgx, struct lmac *lmac, int lmacid)
{ {
if ((lmac->lmac_type != BGX_MODE_10G_KR) && if ((lmac->lmac_type != BGX_MODE_10G_KR) &&
(lmac->lmac_type != BGX_MODE_40G_KR)) { (lmac->lmac_type != BGX_MODE_40G_KR)) {
lmac->use_training = 0; lmac->use_training = false;
return; return;
} }
......
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