* [M68KNOMMU]: improve mii_do_cmd code in FEC driver
@ 2007-10-23 4:37 Greg Ungerer
0 siblings, 0 replies; 2+ messages in thread
From: Greg Ungerer @ 2007-10-23 4:37 UTC (permalink / raw)
To: torvalds; +Cc: gerg, linux-kernel
From: Philippe De Muyter <phdm@macqel.be>
Improve the readability of mii_do_cmd().
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
diff -Naurp linux-2.6.23/drivers/net/fec.c linux-2.6.23-uc0/drivers/net/fec.c
--- linux-2.6.23/drivers/net/fec.c 2007-10-19 10:25:49.000000000 +1000
+++ linux-2.6.23-uc0/drivers/net/fec.c 2007-10-19 10:34:22.000000000 +1000
@@ -770,14 +768,11 @@ mii_queue(struct net_device *dev, int re
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [M68KNOMMU]: improve mii_do_cmd code in FEC driver
@ 2007-10-19 3:46 Greg Ungerer
0 siblings, 0 replies; 2+ messages in thread
From: Greg Ungerer @ 2007-10-19 3:46 UTC (permalink / raw)
To: torvalds; +Cc: gerg, linux-kernel
From: Philippe De Muyter <phdm@macqel.be>
Improve the readability of mii_do_cmd().
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
diff -Naurp linux-2.6.23/drivers/net/fec.c linux-2.6.23-uc0/drivers/net/fec.c
--- linux-2.6.23/drivers/net/fec.c 2007-10-19 10:25:49.000000000 +1000
+++ linux-2.6.23-uc0/drivers/net/fec.c 2007-10-19 10:34:22.000000000 +1000
@@ -770,14 +768,11 @@ mii_queue(struct net_device *dev, int re
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-23 4:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-23 4:37 [M68KNOMMU]: improve mii_do_cmd code in FEC driver Greg Ungerer
-- strict thread matches above, loose matches on Subject: below --
2007-10-19 3:46 Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®