USB: fix locking in idmouse
[safe/jmp/linux-2.6] / drivers / net / fec.c
index 4419c3c..0fbf1bb 100644 (file)
@@ -751,13 +751,11 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
                if (mii_head) {
                        mii_tail->mii_next = mip;
                        mii_tail = mip;
-               }
-               else {
+               } else {
                        mii_head = mii_tail = mip;
                        fep->hwp->fec_mii_data = regval;
                }
-       }
-       else {
+       } else {
                retval = 1;
        }
 
@@ -768,14 +766,11 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
 
 static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c)
 {
-       int k;
-
        if(!c)
                return;
 
-       for(k = 0; (c+k)->mii_data != mk_mii_end; k++) {
-               mii_queue(dev, (c+k)->mii_data, (c+k)->funct);
-       }
+       for (; c->mii_data != mk_mii_end; c++)
+               mii_queue(dev, c->mii_data, c->funct);
 }
 
 static void mii_parse_sr(uint mii_reg, struct net_device *dev)
@@ -792,7 +787,6 @@ static void mii_parse_sr(uint mii_reg, struct net_device *dev)
                status |= PHY_STAT_FAULT;
        if (mii_reg & 0x0020)
                status |= PHY_STAT_ANC;
-
        *s = status;
 }
 
@@ -1239,7 +1233,6 @@ mii_link_interrupt(int irq, void * dev_id);
 #endif
 
 #if defined(CONFIG_M5272)
-
 /*
  *     Code specific to Coldfire 5272 setup.
  */
@@ -2020,8 +2013,7 @@ static void mii_relink(struct work_struct *work)
                    & (PHY_STAT_100FDX | PHY_STAT_10FDX))
                        duplex = 1;
                fec_restart(dev, duplex);
-       }
-       else
+       } else
                fec_stop(dev);
 
 #if 0
@@ -2119,8 +2111,7 @@ mii_discover_phy(uint mii_reg, struct net_device *dev)
                        fep->phy_id = phytype << 16;
                        mii_queue(dev, mk_mii_read(MII_REG_PHYIR2),
                                                        mii_discover_phy3);
-               }
-               else {
+               } else {
                        fep->phy_addr++;
                        mii_queue(dev, mk_mii_read(MII_REG_PHYIR1),
                                                        mii_discover_phy);
@@ -2574,8 +2565,7 @@ fec_restart(struct net_device *dev, int duplex)
        if (duplex) {
                fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;/* MII enable */
                fecp->fec_x_cntrl = 0x04;                 /* FD enable */
-       }
-       else {
+       } else {
                /* MII enable|No Rcv on Xmit */
                fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x06;
                fecp->fec_x_cntrl = 0x00;
@@ -2635,6 +2625,7 @@ static int __init fec_enet_module_init(void)
 {
        struct net_device *dev;
        int i, j, err;
+       DECLARE_MAC_BUF(mac);
 
        printk("FEC ENET Version 0.2\n");
 
@@ -2653,10 +2644,8 @@ static int __init fec_enet_module_init(void)
                        return -EIO;
                }
 
-               printk("%s: ethernet ", dev->name);
-               for (j = 0; (j < 5); j++)
-                       printk("%02x:", dev->dev_addr[j]);
-               printk("%02x\n", dev->dev_addr[5]);
+               printk("%s: ethernet %s\n",
+                      dev->name, print_mac(mac, dev->dev_addr));
        }
        return 0;
 }