net/mlx5: fix build with clang 3.4.2
authorMatan Azrad <matan@mellanox.com>
Wed, 22 Jan 2020 14:36:10 +0000 (14:36 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:20 +0000 (09:51 +0100)
commit99d49f47b38e9caee4886797f6c6db5e4023b213
tree15e707958103497484aaa6341d84601465b5721b
parent33b5fd112df08b76e51ed369154be07ff2678f7e
net/mlx5: fix build with clang 3.4.2

Compilation massage example:
"dpdk/drivers/net/mlx5/mlx5_flow_dv.c:1087:10: error: comparison of
unsigned enum expression < 0 is always false
[-Werror,-Wtautological-compare]
        if (reg < 0)
            ~~~ ^ ~
"

enum modify_reg holds only non-negative integers and in some places in
the code it was used to be compared with negative value, hence
compilation was failed.

Change all thus places to use integer instead of enum modify_reg.

Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query")
Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c