On 6/10/15 3:47 PM, Scott Feldman wrote:
Should that be WARN_ON instead of BUG_ON?

I think I had it as WARN when we were working on the initial patches,
but we changed it to BUG_ON because we should only get an error here
if the driver screwed something up between PREPARE phase and COMMIT
phase, so it should be considered a driver bug which needs fixing.


Linus rants from time to time about the prolific use of BUG_ON. e.g.,
    https://lkml.org/lkml/2015/4/28/528

'BUG_ON() is for things where our internal data structures are so corrupted that we don't know what to do, and there's no way to continue. Not for "I want to sprinkle these things around and this should not happen".'

David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to