Skip to content

Commit 9bcdef3

Browse files
jpirkodavem330
authored andcommitted
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: Or Gerlitz <ogerlitz@mellanox.com> Reported-by: Ido Schimmel <idosch@mellanox.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: 22a6776 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a8cab86 commit 9bcdef3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ mlxsw_sp_acl_tcam_region_entry_remove(struct mlxsw_sp *mlxsw_sp,
561561
mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ptce2), ptce2_pl);
562562
}
563563

564-
#define MLXSW_SP_ACL_TCAM_CATCHALL_PRIO (-1UL)
564+
#define MLXSW_SP_ACL_TCAM_CATCHALL_PRIO (~0U)
565565

566566
static int
567567
mlxsw_sp_acl_tcam_region_catchall_add(struct mlxsw_sp *mlxsw_sp,

0 commit comments

Comments
 (0)