Re: [PATCH] rust: DmaFence: Add better warning through Device reference

From: Philipp Stanner

Date: Mon Sep 28 2026 - 04:38:19 EST


On Mon, 2026-09-28 at 10:11 +0200, Danilo Krummrich wrote:
> On Mon Sep 28, 2026 at 9:52 AM CEST, Philipp Stanner wrote:
> > > > So I suppose we agree that a warning is fine. It won't fire in JQ
> > > > anyways, but might benefit others.
> > >
> > > What scenario are you thinking of?
> >
> > Drivers doing "rather questionable" things, like we've seen a great
> > many times already ;)
> >
> > Note that the dma_fence backend fires a WARN_ON if a fence is freed
> > unsignaled, too, for the same reason.
> >
> > Life finds a way.
>
> I'd rather you engage with the arguments I made above and give a concrete
> example of how it "might benefit others", instead of resorting to know-it-all
> platitudes.

Stating that I cannot know nor conceive all possible patterns and
misbehaviors is quite literally me acknowledging that I do *not* "know
it all".

With this patch I was just trying to accommodate your post-merge
request for replacing pr_ with dev_err() or WARN_ON. If you think
neither is actually necessary, that's also fine by me.


P.