W dniu 6 stycznia 2010 22:30 użytkownik Gábor Stefanik <[email protected]> napisał: > On Wed, Jan 6, 2010 at 10:09 PM, Rafał Miłecki <[email protected]> wrote: >> diff --git a/drivers/net/wireless/b43/phy_lp.c >> b/drivers/net/wireless/b43/phy_lp.c >> index 1e318d8..43a9fcc 100644 >> --- a/drivers/net/wireless/b43/phy_lp.c >> +++ b/drivers/net/wireless/b43/phy_lp.c >> @@ -198,6 +198,17 @@ static void lpphy_table_init(struct b43_wldev *dev) >> >> lpphy_init_tx_gain_table(dev); >> >> + if (dev->phy.rev >=2) { >> + int i; >> + for (i = 0; i < 128; ++i) { > > Two style comments: > 1. Declare i at the beginning of the function. > 2. The preferred style in b43 is i++.
1. May I ask, why? I don't know much about kernel programming, so that's not obvious for me. I declared this at beginning of rev2+ block, because it's used only here. I didn't want to waste memory of (rev < 2) users (yeah, it's just 1 int but let's imagine 1 int in 100 drivers...) 2. I read in many places ++i is faster than i++, but it wasn't about kernel programming actually. Thanks for tip. -- Rafał _______________________________________________ Bcm43xx-dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
