Subject: Re: [PATCH net-next 1/3] net: mdiobus: add APIs for modifying a MDIO device register

From: Andrew Lunn <[email-masked]>
Date: Tue, 17 Mar 2020 15:09:00 +0100

> > Hi Russell
> > 
> > There seems to be growing push back on using BUG_ON and its
> > variants. If should only be used if the system is so badly messed up,
> > going further would only cause more damage. What really happens here
> > if it is called in interrupt context? The mutex lock probably won't
> > work, and we might corrupt the state of the PCS. That is not the end
> > of the world. So i would suggest a WARN_ON here.
> 
> Do we even need these checks? (phylib has them scattered throughout
> on the bus accessors.)  Aren't the might_sleep() checks that are
> already in the locking functions already sufficient?

Hi Russell

I agree, the might_sleep() should be sufficient.

  Andrew