Skip to content

Commit cfe9701

Browse files
idoschdavem330
authored andcommitted
mlxsw: switchx2: Remove unnecessary conversion to bool
Suppress following warning from coccinelle: drivers/net/ethernet/mellanox/mlxsw//switchx2.c:183:63-68: WARNING: conversion to bool not needed here Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e1da961 commit cfe9701

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/switchx2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int mlxsw_sx_port_oper_status_get(struct mlxsw_sx_port *mlxsw_sx_port,
180180
if (err)
181181
return err;
182182
oper_status = mlxsw_reg_paos_oper_status_get(paos_pl);
183-
*p_is_up = oper_status == MLXSW_PORT_ADMIN_STATUS_UP ? true : false;
183+
*p_is_up = oper_status == MLXSW_PORT_ADMIN_STATUS_UP;
184184
return 0;
185185
}
186186

0 commit comments

Comments
 (0)