Messages in this thread | | | Subject | Re: [PATCH] net/mlx4: Use true,false for bool variable | From | Joe Perches <> | Date | Fri, 11 Dec 2020 21:25:01 -0800 |
| |
On Fri, 2020-12-11 at 11:05 +0100, Vasyl Gomonovych wrote: > Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable > Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable [] > diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c [] > @@ -4462,7 +4462,7 @@ static int __init mlx4_verify_params(void) > pr_warn("mlx4_core: log_num_vlan - obsolete module param, using %d\n", > MLX4_LOG_NUM_VLANS); > > > - if (use_prio != 0) > + if (use_prio != false) > pr_warn("mlx4_core: use_prio - obsolete module param, ignored\n");
Generally, assuming use_prio is bool, this would be written
if (use_prio) pr_warn("etc...")
| |