Skip to contentSkip to conversation

mlxsw: Remove unneeded conversions to bool

PATCH New Andrew F. Davis 1 participant 1 message Mar 15, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 9/14 mlxsw: Remove unneeded conversions to bool

Found with scripts/coccinelle/misc/boolconv.cocci.

---
 drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/switchx2.c +1 -1
index ec1e886d4566..a49532281b90 100644
@@ -214,7 +214,7 @@ static int mlxsw_sx_port_oper_status_get(struct mlxsw_sx_port *mlxsw_sx_port,
 	if (err)
 		return err;
 	oper_status = mlxsw_reg_paos_oper_status_get(paos_pl);
-	*p_is_up = oper_status = MLXSW_PORT_ADMIN_STATUS_UP ? true : false;
+	*p_is_up = oper_status = MLXSW_PORT_ADMIN_STATUS_UP;
 	return 0;
 }
 
Signature · 1 line
2.11.0