net: convert multiple drivers to use netdev_for_each_mc_addr, part6
[sfrench/cifs-2.6.git] / drivers / net / smc911x.c
index ef9674c6713f969d59744c2585d15690748e92b0..9871a2b61f869c65e051e8515540e7089c158c75 100644 (file)
@@ -1341,7 +1341,6 @@ static void smc911x_set_multicast_list(struct net_device *dev)
         * within that register.
         */
        else if (!netdev_mc_empty(dev)) {
-               int i;
                struct dev_mc_list *cur_addr;
 
                /* Set the Hash perfec mode */
@@ -1350,8 +1349,7 @@ static void smc911x_set_multicast_list(struct net_device *dev)
                /* start with a table of all zeros: reject all */
                memset(multicast_table, 0, sizeof(multicast_table));
 
-               cur_addr = dev->mc_list;
-               for (i = 0; i < netdev_mc_count(dev); i++, cur_addr = cur_addr->next) {
+               netdev_for_each_mc_addr(cur_addr, dev) {
                        u32 position;
 
                        /* do we have a pointer here? */