Re: [PATCH] checkpatch: Include GEM_BUG_xxx variant in the excluded check list

From: David Hildenbrand
Date: Thu Jun 15 2023 - 11:30:19 EST


On 15.06.23 17:04, Ruhl, Michael J wrote:
-----Original Message-----
From: Joe Perches <joe@xxxxxxxxxxx>
Sent: Wednesday, June 14, 2023 9:47 PM
To: Ruhl, Michael J <michael.j.ruhl@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx;
apw@xxxxxxxxxxxxx; dwaipayanray1@xxxxxxxxx; lukas.bulwahn@xxxxxxxxx;
corbet@xxxxxxx; david@xxxxxxxxxx
Subject: Re: [PATCH] checkpatch: Include GEM_BUG_xxx variant in the
excluded check list

On Wed, 2023-06-14 at 12:49 -0400, Michael J. Ruhl wrote:
GEM_BUG_ON is usually compiled as WARN. You have to change to
debug configuration to get this to be BUG.

checkpatch flags this a WARN level issue.

Since this is a i915 local debug macro, allow its use in checkpatch.pl.

Fixes: 69d517e6e210 ("checkpatch: warn on usage of VM_BUG_ON() and
other BUG variants")

Not a "Fixes", just an additional check


That was discussed when developing that patch:

https://lore.kernel.org/linux-mm/87tu5vflld.fsf@xxxxxxxxx/T/

GEM_BUG_ON(
-> Bad with CONFIG_DRM_I915_DEBUG_GEM_ONCE

Just like VM_BUG_ON or CI_BUG_ON... that BUGs only with another kernel config on.

So this is expected.

--
Cheers,

David / dhildenb