Re: [PATCH] drm/i915/selftests: Declare we allocated the guc clients

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Michel Thierry (2017-11-20 21:52:06)
> On 11/20/2017 1:19 PM, Chris Wilson wrote:
> > Silence sparse over
> > 
> > drivers/gpu/drm/i915/selftests/intel_guc.c:135 igt_guc_init_doorbell_hw() error: we previously assumed 'guc->execbuf_client' could be null (see line 123)
> > drivers/gpu/drm/i915/selftests/intel_guc.c:142 igt_guc_init_doorbell_hw() error: we previously assumed 'guc->preempt_client' could be null (see line 123)
> > 
> > by asserting that we did succeed in creating the pair of clients for
> > testing.
> > 
> 
> Sparse isn't smart enough to see what guc_clients_destroy/_create do.

Oops, not sparse but smatch. Yeah, it doesn't inline as aggressively as
gcc (if that's the right explanation). I'm also not sure if the pattern
it enforces is a great pattern; but it certainly helps curb the
antipatterns so keeping it clean does help with code quality. (So
overall quite a useful little static analyser.)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux