summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/qp.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-05-30 03:59:02 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-08 22:16:39 -0400
commit287aa83dffd1b39859f49d73b0d67f57106de5f1 (patch)
tree8101259996254901fd15f8be6314efddd86e476a /drivers/net/mlx4/qp.c
parent40738f3fcdb951fb8ade286dc1ea05812acc94db (diff)
downloadblackbird-op-linux-287aa83dffd1b39859f49d73b0d67f57106de5f1.tar.gz
blackbird-op-linux-287aa83dffd1b39859f49d73b0d67f57106de5f1.zip
drivers/net: fix comparisons of unsigned < 0
Recent gcc versions emit warnings when unsigned variables are compared < 0 or >= 0. Signed-off-by: Bill Nottingham <notting@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/mlx4/qp.c')
-rw-r--r--drivers/net/mlx4/qp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 7f8b7d55b6e1..492cfaaaa75c 100644
--- a/drivers/net/mlx4/qp.c
+++ b/drivers/net/mlx4/qp.c
@@ -113,8 +113,7 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
struct mlx4_cmd_mailbox *mailbox;
int ret = 0;
- if (cur_state < 0 || cur_state >= MLX4_QP_NUM_STATE ||
- new_state < 0 || cur_state >= MLX4_QP_NUM_STATE ||
+ if (cur_state >= MLX4_QP_NUM_STATE || cur_state >= MLX4_QP_NUM_STATE ||
!op[cur_state][new_state])
return -EINVAL;
OpenPOWER on IntegriCloud