aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
diff options
context:
space:
mode:
authorEyal Perry <eyalpe@mellanox.com>2014-05-14 05:15:16 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-14 15:40:33 -0400
commitc3ca5205e67cfbb0022f004a4036351f90637171 (patch)
tree60aba847031e3aeefa1584867f5b5e139a74322c /drivers/net/ethernet/mellanox/mlx4/en_netdev.c
parentfe1ff29dd4989f6371e8d78bc340f596f4a78e04 (diff)
net/mlx4_en: Using positive error value for unsigned
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_netdev.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 8e8fb69fa871..58209bd0c94c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -130,7 +130,7 @@ static enum mlx4_net_trans_rule_id mlx4_ip_proto_to_trans_rule_id(u8 ip_proto)
130 case IPPROTO_TCP: 130 case IPPROTO_TCP:
131 return MLX4_NET_TRANS_RULE_ID_TCP; 131 return MLX4_NET_TRANS_RULE_ID_TCP;
132 default: 132 default:
133 return -EPROTONOSUPPORT; 133 return MLX4_NET_TRANS_RULE_NUM;
134 } 134 }
135}; 135};
136 136
@@ -177,7 +177,7 @@ static void mlx4_en_filter_work(struct work_struct *work)
177 int rc; 177 int rc;
178 __be64 mac_mask = cpu_to_be64(MLX4_MAC_MASK << 16); 178 __be64 mac_mask = cpu_to_be64(MLX4_MAC_MASK << 16);
179 179
180 if (spec_tcp_udp.id < 0) { 180 if (spec_tcp_udp.id >= MLX4_NET_TRANS_RULE_NUM) {
181 en_warn(priv, "RFS: ignoring unsupported ip protocol (%d)\n", 181 en_warn(priv, "RFS: ignoring unsupported ip protocol (%d)\n",
182 filter->ip_proto); 182 filter->ip_proto);
183 goto ignore; 183 goto ignore;