mlx4: fix unneeded function error with clang 3.6
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 8 Feb 2016 22:11:49 +0000 (22:11 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 17:52:17 +0000 (18:52 +0100)
commit3b32a6b417f3ac8d7723412577859d34b0d885b9
tree2702efa13d66b010ef62eabd28f5c4ef666270cc
parent7958b1310d5e5650de629b066af5475d427b45e2
mlx4: fix unneeded function error with clang 3.6

When compiling with clang 3.6, the mlx4 driver gives the following error
message about an unneeded function.

  CC mlx4.o
.../drivers/net/mlx4/mlx4.c:136:20: fatal error: function
      'wr_id_t_check' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static inline void wr_id_t_check(void)
                   ^
1 error generated.

The function is to compile-time check the size of wr_id_t, so use
the standard DPDK BUILD_BUG_ON macro to do so in the init function
instead.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx4/mlx4.c