Skip to content

Commit

Permalink
mlx4_core: Fix min() warning
Browse files Browse the repository at this point in the history
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" <davem@davemloft.net>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Cc: Jack Morgenstein <jackm@dev.mellanox.co.il>
Cc: Vladimir Sokolovsky <vlad@mellanox.co.il>
Cc: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Andrew Morton authored and Roland Dreier committed Jan 16, 2009
1 parent e0b325d commit d3b924d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/mlx4/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,
profile[MLX4_RES_AUXC].num = request->num_qp;
profile[MLX4_RES_SRQ].num = request->num_srq;
profile[MLX4_RES_CQ].num = request->num_cq;
profile[MLX4_RES_EQ].num = min(dev_cap->max_eqs,
dev_cap->reserved_eqs +
num_possible_cpus() + 1);
profile[MLX4_RES_EQ].num = min_t(unsigned, dev_cap->max_eqs,
dev_cap->reserved_eqs +
num_possible_cpus() + 1);
profile[MLX4_RES_DMPT].num = request->num_mpt;
profile[MLX4_RES_CMPT].num = MLX4_NUM_CMPTS;
profile[MLX4_RES_MTT].num = request->num_mtt;
Expand Down

0 comments on commit d3b924d

Please sign in to comment.