[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <500B7916.6060804@lwfinger.net>
Date: Sat, 21 Jul 2012 22:52:54 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: Christopher Li <sparse@...isli.org>
CC: Linux-Sparse <linux-sparse@...r.kernel.org>,
linux-kernel@...r.kernel.org
Subject: False warning from Sparse
Hi,
I am getting the following false warning from sparse:
CHECK drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:1158:13: warning: context
imbalance in 'rtl92c_dm_refresh_rate_adaptive_mask' - different lock contexts
for basic block
The only code in that routine that does any locking is the following:
/* Only the PCI card uses sta in the update rate table
* callback routine */
if (rtlhal->interface == INTF_PCI) {
rcu_read_lock();
sta = ieee80211_find_sta(mac->vif, mac->bssid);
}
rtlpriv->cfg->ops->update_rate_tbl(hw, sta,
p_ra->ratr_state);
p_ra->pre_ratr_state = p_ra->ratr_state;
if (rtlhal->interface == INTF_PCI)
rcu_read_unlock();
Does the warning get output because the code cannot assume that
rtlhal->interface is the same in both if statements? If that is the case, are
there any compiler directives that would tell sparse of the situation?
Thanks,
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists