]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net/mlx4_en: Using positive error value for unsigned
authorEyal Perry <eyalpe@mellanox.com>
Wed, 14 May 2014 09:15:16 +0000 (12:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 May 2014 19:40:33 +0000 (15:40 -0400)
Using a positive value for error: MLX4_NET_TRANS_RULE_NUM instead
of -EPROTONOSUPPORT, to remove compilation warning.

Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index 8e8fb69fa871ccda2db2f1a07173e8ac542c0571..58209bd0c94c6ced62a5984dd72911669eaa7ef9 100644 (file)
@@ -130,7 +130,7 @@ static enum mlx4_net_trans_rule_id mlx4_ip_proto_to_trans_rule_id(u8 ip_proto)
        case IPPROTO_TCP:
                return MLX4_NET_TRANS_RULE_ID_TCP;
        default:
-               return -EPROTONOSUPPORT;
+               return MLX4_NET_TRANS_RULE_NUM;
        }
 };
 
@@ -177,7 +177,7 @@ static void mlx4_en_filter_work(struct work_struct *work)
        int rc;
        __be64 mac_mask = cpu_to_be64(MLX4_MAC_MASK << 16);
 
-       if (spec_tcp_udp.id < 0) {
+       if (spec_tcp_udp.id >= MLX4_NET_TRANS_RULE_NUM) {
                en_warn(priv, "RFS: ignoring unsupported ip protocol (%d)\n",
                        filter->ip_proto);
                goto ignore;