net: atheros: Remove WARN_ON(in_interrupt())
authorThomas Gleixner <tglx@linutronix.de>
Tue, 29 Sep 2020 20:25:14 +0000 (22:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2020 21:02:53 +0000 (14:02 -0700)
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 check covers only parts of the contexts in which these
functions cannot be called. It fails to detect preemption or interrupt
disabled invocations.

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

Just remove them.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/atl1c/atl1c_main.c
drivers/net/ethernet/atheros/atl1e/atl1e_main.c
drivers/net/ethernet/atheros/atlx/atl2.c

index 00de463268a8429793423aec4232c09eff589d80..0c12cf7bda504a527ef6edc10485fdf20a3c6411 100644 (file)
@@ -220,7 +220,6 @@ static void atl1c_phy_config(struct timer_list *t)
 
 void atl1c_reinit_locked(struct atl1c_adapter *adapter)
 {
-       WARN_ON(in_interrupt());
        atl1c_down(adapter);
        atl1c_up(adapter);
        clear_bit(__AT_RESETTING, &adapter->flags);
index e43f71849daf2c1905cc45674cfd2d46a8c6a423..098b0328e3cb0ef8d777729eafca1e7410f317b9 100644 (file)
@@ -127,8 +127,6 @@ static void atl1e_phy_config(struct timer_list *t)
 
 void atl1e_reinit_locked(struct atl1e_adapter *adapter)
 {
-
-       WARN_ON(in_interrupt());
        while (test_and_set_bit(__AT_RESETTING, &adapter->flags))
                msleep(1);
        atl1e_down(adapter);
index 021fb0e6417a038ddacfb16df71ed851ed2d6e43..7b80d924632ad804058628ce9a911111a8b98825 100644 (file)
@@ -1086,7 +1086,6 @@ err_up:
 
 static void atl2_reinit_locked(struct atl2_adapter *adapter)
 {
-       WARN_ON(in_interrupt());
        while (test_and_set_bit(__ATL2_RESETTING, &adapter->flags))
                msleep(1);
        atl2_down(adapter);