[Intel-xe] [RFC 4/5] drm/xe: Remove useless XE_BUG_ON.
Michal Wajdeczko
michal.wajdeczko at intel.com
Tue Mar 28 21:03:16 UTC 2023
On 28.03.2023 22:27, Vivi, Rodrigo wrote:
> On Tue, 2023-03-28 at 13:24 -0700, Matt Roper wrote:
>> On Tue, Mar 28, 2023 at 12:10:20PM -0400, Rodrigo Vivi wrote:
>>> If that becomes needed for some reason we bring it
>>> back with some written reasoning.
>>
>> From a quick skim through this patch, most/all of these shouldn't be
>> BUG_ON either. These are assertions that we don't expect to get
>> triggered, but if we do screw up somewhere we shouldn't be bringing
>> down
>> the entire machine; a WARN (and possibly an early exit) would be more
>> appropriate for most of these.
>
> yeap! I fully agree on that. I get frustrated when I hit one of these
> BUG_ONs that should be a graceful exit with a warn without a panic...
Recently there was another discussion with proposal to introduce
XE_ASSERT as a replacement of XE_BUG_ON - is this still considered ?
We likely don't want to pollute production driver with too many
redundant BUG_ON/WARN_ON, but still want be paranoid on debug builds
(with just WARNs and continuing until the unavoidable crash).
Michal
More information about the Intel-xe
mailing list