From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Wed, 12 Aug 2015 00:43:24 +0300 Subject: [ath9k-devel] ath9k_htc: Support for AR9271 chipset. Message-ID: <20150811214324.GA30816@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Hello Sujith, The patch fb9987d0f748: "ath9k_htc: Support for AR9271 chipset." from Mar 17, 2010, leads to the following static checker warning: drivers/net/wireless/ath/ath9k/htc_drv_main.c:850 ath9k_htc_ani_work() warn: 'common->ani.caldone' can be either negative or positive drivers/net/wireless/ath/ath9k/htc_drv_main.c 830 /* Perform calibration if necessary */ 831 if (longcal || shortcal) 832 common->ani.caldone = 833 ath9k_hw_calibrate(ah, ah->curchan, 834 ah->rxchainmask, longcal); ath9k_hw_calibrate() returns true/false/-ETIMEOUT. 835 836 ath9k_htc_ps_restore(priv); 837 } 838 839 set_timer: 840 /* 841 * Set timer interval based on previous results. 842 * The interval must be the shortest necessary to satisfy ANI, 843 * short calibration and long calibration. 844 */ 845 cal_interval = ATH_LONG_CALINTERVAL; 846 cal_interval = min(cal_interval, (u32)ATH_ANI_POLLINTERVAL); 847 if (!common->ani.caldone) But we don't test for negative here. 848 cal_interval = min(cal_interval, (u32)short_cal_interval); 849 850 ieee80211_queue_delayed_work(common->hw, &priv->ani_work, 851 msecs_to_jiffies(cal_interval)); 852 } regards, dan carpenter