diff options
author | Bill Nottingham <notting@redhat.com> | 2007-05-30 09:59:02 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-09 04:16:39 +0200 |
commit | 287aa83dffd1b39859f49d73b0d67f57106de5f1 (patch) | |
tree | 8101259996254901fd15f8be6314efddd86e476a /drivers/net/mlx4 | |
parent | PCMCIA-NETDEV : add new ID of lan&modem multifunction card (diff) | |
download | linux-287aa83dffd1b39859f49d73b0d67f57106de5f1.tar.xz 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')
-rw-r--r-- | drivers/net/mlx4/qp.c | 3 |
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; |