Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bcdef32 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

spectrum: acl_tcam: Fix catchall prio value



This fixes an issue reported by smatch:
mlxsw_sp_acl_tcam_chunk_create() warn: impossible condition '(priority == (-1)) => (0-u32max == u64max)'

Reported-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reported-by: default avatarIdo Schimmel <idosch@mellanox.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 22a67766 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation")
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Acked-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a8cab863
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ mlxsw_sp_acl_tcam_region_entry_remove(struct mlxsw_sp *mlxsw_sp,
	mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ptce2), ptce2_pl);
}

#define MLXSW_SP_ACL_TCAM_CATCHALL_PRIO (-1UL)
#define MLXSW_SP_ACL_TCAM_CATCHALL_PRIO (~0U)

static int
mlxsw_sp_acl_tcam_region_catchall_add(struct mlxsw_sp *mlxsw_sp,