提交 0171f4e8 编写于 作者: S Sebastian Andrzej Siewior 提交者: David S. Miller

net: intel: Remove in_interrupt() warnings

in_interrupt() is ill defined and does not provide what the name
suggests. The usage especially in driver code is deprecated and a tree wide
effort to clean up and consolidate the (ab)usage of in_interrupt() and
related checks is happening.

In this case the checks cover only parts of the contexts in which these
functions cannot be called. They fail to detect preemption or interrupt
disabled invocations.

As the functions which are invoked from the various places contain already
a broad variety of checks (always enabled or debug option dependent) cover
all invalid conditions already, there is no point in having inconsistent
warnings in those drivers.

Just remove them.
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Reviewed-by: NAlexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c35a0824
...@@ -536,7 +536,6 @@ void e1000_down(struct e1000_adapter *adapter) ...@@ -536,7 +536,6 @@ void e1000_down(struct e1000_adapter *adapter)
void e1000_reinit_locked(struct e1000_adapter *adapter) void e1000_reinit_locked(struct e1000_adapter *adapter)
{ {
WARN_ON(in_interrupt());
while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
msleep(1); msleep(1);
......
...@@ -221,8 +221,6 @@ static bool fm10k_prepare_for_reset(struct fm10k_intfc *interface) ...@@ -221,8 +221,6 @@ static bool fm10k_prepare_for_reset(struct fm10k_intfc *interface)
{ {
struct net_device *netdev = interface->netdev; struct net_device *netdev = interface->netdev;
WARN_ON(in_interrupt());
/* put off any impending NetWatchDogTimeout */ /* put off any impending NetWatchDogTimeout */
netif_trans_update(netdev); netif_trans_update(netdev);
......
...@@ -6691,7 +6691,6 @@ static void i40e_vsi_reinit_locked(struct i40e_vsi *vsi) ...@@ -6691,7 +6691,6 @@ static void i40e_vsi_reinit_locked(struct i40e_vsi *vsi)
{ {
struct i40e_pf *pf = vsi->back; struct i40e_pf *pf = vsi->back;
WARN_ON(in_interrupt());
while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state)) while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state))
usleep_range(1000, 2000); usleep_range(1000, 2000);
i40e_down(vsi); i40e_down(vsi);
...@@ -8464,9 +8463,6 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags, bool lock_acquired) ...@@ -8464,9 +8463,6 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags, bool lock_acquired)
{ {
u32 val; u32 val;
WARN_ON(in_interrupt());
/* do the biggest reset indicated */ /* do the biggest reset indicated */
if (reset_flags & BIT_ULL(__I40E_GLOBAL_RESET_REQUESTED)) { if (reset_flags & BIT_ULL(__I40E_GLOBAL_RESET_REQUESTED)) {
......
...@@ -486,7 +486,6 @@ static void ice_do_reset(struct ice_pf *pf, enum ice_reset_req reset_type) ...@@ -486,7 +486,6 @@ static void ice_do_reset(struct ice_pf *pf, enum ice_reset_req reset_type)
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
dev_dbg(dev, "reset_type 0x%x requested\n", reset_type); dev_dbg(dev, "reset_type 0x%x requested\n", reset_type);
WARN_ON(in_interrupt());
ice_prepare_for_reset(pf); ice_prepare_for_reset(pf);
......
...@@ -2221,7 +2221,6 @@ void igb_down(struct igb_adapter *adapter) ...@@ -2221,7 +2221,6 @@ void igb_down(struct igb_adapter *adapter)
void igb_reinit_locked(struct igb_adapter *adapter) void igb_reinit_locked(struct igb_adapter *adapter)
{ {
WARN_ON(in_interrupt());
while (test_and_set_bit(__IGB_RESETTING, &adapter->state)) while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
usleep_range(1000, 2000); usleep_range(1000, 2000);
igb_down(adapter); igb_down(adapter);
......
...@@ -3833,7 +3833,6 @@ void igc_down(struct igc_adapter *adapter) ...@@ -3833,7 +3833,6 @@ void igc_down(struct igc_adapter *adapter)
void igc_reinit_locked(struct igc_adapter *adapter) void igc_reinit_locked(struct igc_adapter *adapter)
{ {
WARN_ON(in_interrupt());
while (test_and_set_bit(__IGC_RESETTING, &adapter->state)) while (test_and_set_bit(__IGC_RESETTING, &adapter->state))
usleep_range(1000, 2000); usleep_range(1000, 2000);
igc_down(adapter); igc_down(adapter);
......
...@@ -5672,7 +5672,6 @@ static void ixgbe_up_complete(struct ixgbe_adapter *adapter) ...@@ -5672,7 +5672,6 @@ static void ixgbe_up_complete(struct ixgbe_adapter *adapter)
void ixgbe_reinit_locked(struct ixgbe_adapter *adapter) void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
{ {
WARN_ON(in_interrupt());
/* put off any impending NetWatchDogTimeout */ /* put off any impending NetWatchDogTimeout */
netif_trans_update(adapter->netdev); netif_trans_update(adapter->netdev);
......
...@@ -2522,8 +2522,6 @@ void ixgbevf_down(struct ixgbevf_adapter *adapter) ...@@ -2522,8 +2522,6 @@ void ixgbevf_down(struct ixgbevf_adapter *adapter)
void ixgbevf_reinit_locked(struct ixgbevf_adapter *adapter) void ixgbevf_reinit_locked(struct ixgbevf_adapter *adapter)
{ {
WARN_ON(in_interrupt());
while (test_and_set_bit(__IXGBEVF_RESETTING, &adapter->state)) while (test_and_set_bit(__IXGBEVF_RESETTING, &adapter->state))
msleep(1); msleep(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册