Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=287aa83dffd1b39859f49d73b0d67f57106de5f1
Commit:     287aa83dffd1b39859f49d73b0d67f57106de5f1
Parent:     40738f3fcdb951fb8ade286dc1ea05812acc94db
Author:     Bill Nottingham <[EMAIL PROTECTED]>
AuthorDate: Wed May 30 03:59:02 2007 -0400
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sun Jul 8 22:16:39 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/mlx4/qp.c               |    3 +--
 drivers/net/netxen/netxen_nic_niu.c |    6 +++---
 drivers/net/tulip/de2104x.c         |    1 -
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 7f8b7d5..492cfaa 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;
 
diff --git a/drivers/net/netxen/netxen_nic_niu.c 
b/drivers/net/netxen/netxen_nic_niu.c
index 75102d3..05e0577 100644
--- a/drivers/net/netxen/netxen_nic_niu.c
+++ b/drivers/net/netxen/netxen_nic_niu.c
@@ -724,7 +724,7 @@ int netxen_niu_disable_gbe_port(struct netxen_adapter 
*adapter)
        __u32 mac_cfg0;
        u32 port = physical_port[adapter->portnum];
 
-       if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
+       if (port > NETXEN_NIU_MAX_GBE_PORTS)
                return -EINVAL;
        mac_cfg0 = 0;
        netxen_gb_soft_reset(mac_cfg0);
@@ -757,7 +757,7 @@ int netxen_niu_set_promiscuous_mode(struct netxen_adapter 
*adapter,
        __u32 reg;
        u32 port = physical_port[adapter->portnum];
 
-       if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
+       if (port > NETXEN_NIU_MAX_GBE_PORTS)
                return -EINVAL;
 
        /* save previous contents */
@@ -894,7 +894,7 @@ int netxen_niu_xg_set_promiscuous_mode(struct 
netxen_adapter *adapter,
        __u32 reg;
        u32 port = physical_port[adapter->portnum];
 
-       if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS))
+       if (port > NETXEN_NIU_MAX_XG_PORTS)
                return -EINVAL;
 
        if (netxen_nic_hw_read_wx(adapter,
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 8617298..d380e0b 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -785,7 +785,6 @@ static void __de_set_rx_mode (struct net_device *dev)
 
        de->tx_head = NEXT_TX(entry);
 
-       BUG_ON(TX_BUFFS_AVAIL(de) < 0);
        if (TX_BUFFS_AVAIL(de) == 0)
                netif_stop_queue(dev);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to