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

Commit d3b924d9 authored by Andrew Morton's avatar Andrew Morton Committed by Roland Dreier
Browse files

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 ae7a47e7 ("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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent e0b325d3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ 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,
	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;