[bug report] drm/i915: Use the i915_device name for identifying our request fences

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

 



Hello Chris Wilson,

The patch 65c29dbb19b2: "drm/i915: Use the i915_device name for
identifying our request fences" from Dec 11, 2019, leads to the
following static checker warning:

	drivers/gpu/drm/i915/i915_request.c:77 i915_fence_get_timeline_name()
	warn: this array is non-NULL. 'to_request(fence)->gem_context->name'

drivers/gpu/drm/i915/i915_request.c
    63  static const char *i915_fence_get_timeline_name(struct dma_fence *fence)
    64  {
    65          /*
    66           * The timeline struct (as part of the ppgtt underneath a context)
    67           * may be freed when the request is no longer in use by the GPU.
    68           * We could extend the life of a context to beyond that of all
    69           * fences, possibly keeping the hw resource around indefinitely,
    70           * or we just give them a false name. Since
    71           * dma_fence_ops.get_timeline_name is a debug feature, the occasional
    72           * lie seems justifiable.
                   ^^^^^^^^^^^^^^^^^^^^^
Obsolete comment?

    73           */
    74          if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
    75                  return "signaled";
    76  
    77          return to_request(fence)->gem_context->name ?: "[" DRIVER_NAME "]";
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Not possibly NULL.

    78  }

regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux