Skip to content

Commit d3b924d

Browse files
akpm00Roland Dreier
authored andcommitted
mlx4_core: Fix min() warning
Fix drivers/net/mlx4/profile.c: In function `mlx4_make_profile': drivers/net/mlx4/profile.c:110: warning: comparison of distinct pointer types lacks a cast This happened because num_possible_cpus() was secretly changed by commit ae7a47e ("cpumask: make cpumask.h eat its own dogfood.") from returning "int" to (now) returning "unsigned int". I think that was a good change, so we should just swallow the fallout. Cc: "David S. Miller" <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Yevgeny Petrilin <[email protected]> Cc: Jack Morgenstein <[email protected]> Cc: Vladimir Sokolovsky <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent e0b325d commit d3b924d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/mlx4/profile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,
107107
profile[MLX4_RES_AUXC].num = request->num_qp;
108108
profile[MLX4_RES_SRQ].num = request->num_srq;
109109
profile[MLX4_RES_CQ].num = request->num_cq;
110-
profile[MLX4_RES_EQ].num = min(dev_cap->max_eqs,
111-
dev_cap->reserved_eqs +
112-
num_possible_cpus() + 1);
110+
profile[MLX4_RES_EQ].num = min_t(unsigned, dev_cap->max_eqs,
111+
dev_cap->reserved_eqs +
112+
num_possible_cpus() + 1);
113113
profile[MLX4_RES_DMPT].num = request->num_mpt;
114114
profile[MLX4_RES_CMPT].num = MLX4_NUM_CMPTS;
115115
profile[MLX4_RES_MTT].num = request->num_mtt;

0 commit comments

Comments
 (0)