mlxsw: switchx2: Remove unnecessary conversion to bool
authorIdo Schimmel <idosch@mellanox.com>
Fri, 27 Mar 2020 08:55:24 +0000 (11:55 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Mar 2020 22:06:43 +0000 (15:06 -0700)
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 <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/switchx2.c

index f0e98ec8f1eeac8b48a5cebb1986e98574fe1bf3..90535820b559db36040c7758657ad8d3758a7267 100644 (file)
@@ -180,7 +180,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;
 }