• Sebastian Andrzej Siewior's avatar
    net: mdiobus: Remove WARN_ON_ONCE(in_interrupt()) · 85bdebd1
    Sebastian Andrzej Siewior authored
    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 contain these warnings invoke mutex_lock() which
    contains a broad variety of checks (always enabled or debug option
    dependent) and therefore covers all invalid conditions already, there is no
    point in having inconsistent warnings in those drivers. The conditional
    return is not really valuable in practice either.
    
    Just remove them.
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    85bdebd1
mdio_bus.c 26 KB