On Monday 29 December 2008 13:11:00 Johannes Berg wrote: > On Mon, 2008-12-29 at 15:53 -0800, Vivek Natarajan wrote: > > > +#define ATH9K_PS_WAKEUP(sc) \ > > + do { \ > > + if (!atomic_read(&sc->ps_usecount) && \ > > + (ah->ah_powerMode != ATH9K_PM_AWAKE)) { \ > > + ah->ah_restoreMode = ah->ah_powerMode; \ > > + ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); \ > > + } \ > > + atomic_inc(&sc->ps_usecount); \ > > + } while (0); > > + > > +#define ATH9K_PS_RESTORE(sc) \ > > + do { \ > > + if (atomic_dec_and_test(&sc->ps_usecount) && \ > > + (sc->hw->conf.flags & IEEE80211_CONF_PS)) \ > > + ath9k_hw_setpower(sc->sc_ah, ah->ah_restoreMode); \ > > + } while (0); > > I think those would be better as static inlines rather than macros. And the do-while c-block-protection of the macro is buggy. It has an extra semicolon at the end, which defeats the whole purpose. -- Greetings, Michael. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html