[ath9k-devel] [patch] ath9k_hw: min_t() casts u32 to int

2011-10-17 Thread Dan Carpenter
The code here treats very large values of "limit" as less than MAX_POWER_RATE because of the cast to int. We should do the compare as u32 instead. Signed-off-by: Dan Carpenter diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index e0c8549..f9abbb7 100644 -

Re: [ath9k-devel] [patch] ath9k_hw: min_t() casts u32 to int

2011-10-18 Thread Pavel Roskin
On Mon, 17 Oct 2011 10:28:23 +0300 Dan Carpenter wrote: > The code here treats very large values of "limit" as less than > MAX_POWER_RATE because of the cast to int. We should do the compare > as u32 instead. > > Signed-off-by: Dan Carpenter Reviewed-by: Pavel Roskin I don't think it can ac