]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hlist-drop-the-node-parameter-from-iterators-fix-fix-fix-fix-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:17:05 +0000 (13:17 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 06:02:09 +0000 (17:02 +1100)
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index 1bdae3774ea17630f5861ecc6fb8cc900a45db00..9bf86454dea10f41e61c0d38434de0983bd0e530 100644 (file)
@@ -573,13 +573,13 @@ static void mlx4_en_put_qp(struct mlx4_en_priv *priv)
 
        if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0) {
                struct mlx4_mac_entry *entry;
-               struct hlist_node *n, *tmp;
+               struct hlist_node *tmp;
                struct hlist_head *bucket;
                unsigned int mac_hash;
 
                mac_hash = priv->dev->dev_addr[MLX4_EN_MAC_HASH_IDX];
                bucket = &priv->mac_hash[mac_hash];
-               hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+               hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
                        if (ether_addr_equal_64bits(entry->mac,
                                                    priv->dev->dev_addr)) {
                                en_dbg(DRV, priv, "Releasing qp: port %d, MAC %pM, qpn %d\n",
@@ -608,11 +608,11 @@ static int mlx4_en_replace_mac(struct mlx4_en_priv *priv, int qpn,
                struct hlist_head *bucket;
                unsigned int mac_hash;
                struct mlx4_mac_entry *entry;
-               struct hlist_node *n, *tmp;
+               struct hlist_node *tmp;
                u64 prev_mac_u64 = mlx4_en_mac_to_u64(prev_mac);
 
                bucket = &priv->mac_hash[prev_mac[MLX4_EN_MAC_HASH_IDX]];
-               hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+               hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
                        if (ether_addr_equal_64bits(entry->mac, prev_mac)) {
                                mlx4_en_uc_steer_release(priv, entry->mac,
                                                         qpn, entry->reg_id);
@@ -1018,7 +1018,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
 {
        struct netdev_hw_addr *ha;
        struct mlx4_mac_entry *entry;
-       struct hlist_node *n, *tmp;
+       struct hlist_node *tmp;
        bool found;
        u64 mac;
        int err = 0;
@@ -1034,7 +1034,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
        /* find what to remove */
        for (i = 0; i < MLX4_EN_MAC_HASH_SIZE; ++i) {
                bucket = &priv->mac_hash[i];
-               hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+               hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
                        found = false;
                        netdev_for_each_uc_addr(ha, dev) {
                                if (ether_addr_equal_64bits(entry->mac,
@@ -1077,7 +1077,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
        netdev_for_each_uc_addr(ha, dev) {
                found = false;
                bucket = &priv->mac_hash[ha->addr[MLX4_EN_MAC_HASH_IDX]];
-               hlist_for_each_entry(entry, n, bucket, hlist) {
+               hlist_for_each_entry(entry, bucket, hlist) {
                        if (ether_addr_equal_64bits(entry->mac, ha->addr)) {
                                found = true;
                                break;