On Tue, 2007-11-06 at 09:47 -0500, Robert P. J. Day wrote: > Signed-off-by: Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> > NACK. is_power_of_2() cannot do compile time check for TFD_QUEUE_SIZE_MAX. Furthermore, the runtime check for TFD_QUEUE_SIZE_MAX is already done by iwl_queue_init(). Thanks, -yi > --- > > drivers/net/wireless/iwlwifi/iwl3945-base.c | 3 ++- > drivers/net/wireless/iwlwifi/iwl4965-base.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c > index 4f22a71..53b4b4e 100644 > --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c > +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c > @@ -50,6 +50,7 @@ > #include <linux/firmware.h> > #include <linux/etherdevice.h> > #include <linux/if_arp.h> > +#include <linux/log2.h> > > #include <net/ieee80211_radiotap.h> > #include <net/mac80211.h> > @@ -343,7 +344,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv, > > /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise > * iwl_queue_inc_wrap and iwl_queue_dec_wrap are broken. */ > - BUILD_BUG_ON(TFD_QUEUE_SIZE_MAX & (TFD_QUEUE_SIZE_MAX - 1)); > + BUILD_BUG_ON(!is_power_of_2(TFD_QUEUE_SIZE_MAX)); > iwl_queue_init(priv, &txq->q, TFD_QUEUE_SIZE_MAX, slots_num, txq_id); > > iwl_hw_tx_queue_init(priv, txq); > diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c > index d60adcb..5f3bcb3 100644 > --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c > +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c > @@ -50,6 +50,7 @@ > #include <linux/firmware.h> > #include <linux/etherdevice.h> > #include <linux/if_arp.h> > +#include <linux/log2.h> > > #include <net/ieee80211_radiotap.h> > #include <net/mac80211.h> > @@ -342,7 +343,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv, > > /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise > * iwl_queue_inc_wrap and iwl_queue_dec_wrap are broken. */ > - BUILD_BUG_ON(TFD_QUEUE_SIZE_MAX & (TFD_QUEUE_SIZE_MAX - 1)); > + BUILD_BUG_ON(!is_power_of_2(TFD_QUEUE_SIZE_MAX)); > iwl_queue_init(priv, &txq->q, TFD_QUEUE_SIZE_MAX, slots_num, txq_id); > > iwl_hw_tx_queue_init(priv, txq); > - 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