From: Philippe De Muyter Date: Tue, 23 Oct 2007 04:37:54 +0000 (+1000) Subject: m68knommu: improve mii_do_cmd code in FEC driver X-Git-Tag: v2.6.24-rc1~40 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be6cb66da76fe089a4032a85c3825223a2216beb;p=linux-2.6 m68knommu: improve mii_do_cmd code in FEC driver Improve the readability of mii_do_cmd(). Signed-off-by: Philippe De Muyter Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds --- diff --git a/drivers/net/fec.c b/drivers/net/fec.c index e0d875531e..0fbf1bbbae 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -766,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)